Beginners - September 2012 (Page 27)

Why Is This Expression Resulting In an Integer?
 
I have this expression, which attempts to remove a set flag: Flags &= (~FLAG_LOCKED); Where " Flags " is of type " Flag ", and " FLAG_LOCKED " is part of t...
[5 replies] Last: Never mind, lads. I ended up implementing a structure which holds stat... (by closed account zb0S216C)
3rd Programming Assignment
 
I just started learning c++ 2 weeks ago, and it is my first programming language. I'm taking an intro to programming class online, so, you, the internet are my ...
[6 replies] Last: I can't mess around with that program at the moment, but I will in the... (by ProductFailure)
Identity Matrix error
 
Hi, I am building an identity matrix as part of a matrix multiplication program. I made the code below and am getting an error "express must have arithmatic ...
[4 replies] Last: @nshogaboom Why is "row" being converted to the pointer? Becaus... (by vlad from moscow)
Basic Console Tic Tac Toe game
 
So I started learning C++ a few years ago and got a little bit past console programming but then I stopped and just recently started up again. I did some basic ...
[4 replies] Last: Ok thanks for the help. Is there anything you guys recommend for going... (by jsladerman)
can anyone tell me why my program wont compile?
 
I keep getting this error calculate.cpp: In function `int main()': calculate.cpp:33: call of overloaded `sqrt(int&)' is ambiguous /usr/local/lib/gcc-lib/spar...
[2 replies] Last: Try casting to one of those three types like the compiler suggests. ... (by kevinkjt2000)
get 2 dimensional array from a function to the main
 
I have 2 dimensional array in a function and I want to get it in my main function like this way func() { int array ={2,3,4,5,6,7}; } int main() {...
[5 replies] Last: I hope this example lets you see how a function can pass back to main.... (by kevinkjt2000)
\n
 
this code works only if there is \n before %c in scanf statement. please explain me why? #include<stdio.h> #include<conio.h> int main() { char ch; d...
[2 replies] Last: Then there is specification %c then white spaces are not skipped. So w... (by vlad from moscow)
Text Based Game Help - Total Beginner here
 
Yes, this is help with a school assignment. It's an intro to C++ class so I'm a total beginner here. We have to create a text-based game with certain functi...
[7 replies] Last: Okay! So now I'm having an issue of "The variable 'fRand_number' is be... (by LadyDustBunny)
Compare Input Data to File Data
 
I'm making a trivial pursuit type game. There's 5 questions, and each question you're able to answer with 1, 2, 3 or 4. I'm required to use a data file as an an...
[2 replies] Last: You're going to first have to learn how to read in data files! http:/... (by biddlesby)
Priority queue of struct
 
Hello, I have the following struct: typedef struct { string state; string parent; string action; int pathcost; int depth; } node; I need...
[2 replies] Last: There is a priority queue available in stl http://www.cplusplus.com/r... (by mik2718)
by Serri
For loop
 
i'm trying to write a program that will do this: If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of t...
[8 replies] Last: > only one of them should be added each time 3*x or 5*x becomes the sa... (by JLBorges)
stucture small problem
 
#include <iostream> #include <cstring> #include <string> using namespace std; int ReverseString(char *); struct node { node *prev; char c; node *next; ...
[11 replies] Last: Try writing these two functions first. // given a string, make a sin... (by JLBorges)
by kabuki
Need help with if else statement
 
What I'm trying to achieve is to not allow the denominator to be 0. So I am trying to make the denominator default to 1 if I was to enter 0 for the it. I need h...
[2 replies] Last: Thanks a bunch. That fixed my problem. I'm only using printf and scanf... (by kabuki)
Complex Number C++
 
Can anyone help me? I got a task from my lecturer to make a program about "complex number" with 4 operating ( - , + , x , : )
[14 replies] Last: @chipp Yeah, didn't see that one @Zumphex Never mind always R... (by Aceix)
by Fliize
Asking for pointer explanation (in a linked list)
 
Im trying to understand pointers & linked lists, so far so good, but there is one thing i cant get my head around. I created a Linked list of a struct, witch c...
[2 replies] Last: Im starting to think that my tutorial aint that good.. http://www.func... (by Fliize)
SDL & Qt
 
Hi, Could someone tell me what SDL and Qt are, please? I have installed C4Droid on Android my mobile phone, and I'm trying to conserve memory on my ZTE Blade...
[2 replies] Last: Thanks Peter, for both your advice and the quick response. :) (by Officer Dibble)
newbie trouble with if/else statements
 
Hi guys, first time post. Im working on what i figured an easy program to calculate the price of jars of honey. Prices will go down the more you guy, with 2 or...
[5 replies] Last: i think, it's because fixed (by chipp)
by zkl
Module Practice
 
Hi, Im doing some practice on Class. So im doing this one example but I cant get the out put I wanted. This is my code: The output does not print out ...
[6 replies] Last: Yeah, that's right, so a return; at the end of a void funtion is use... (by Fransje)
by khal
Loading File
 
Hi, I was wondering if someone could explain to me how to run a program in terminal with this format. MyCode <Text.txt> <AnotherText.txt> <Flag> The flag shou...
[9 replies] Last: I actually checked before and the result is correct that argv hold, ... (by cire)
by ibnu
write the data to text file
 
how to write and save the data to the text file?
[5 replies] Last: i will try it later.....tq......:) (by ibnu)
September 2012 Pages: 1... 2526272829... 62
  Archived months: [aug2012] [oct2012]

This is an archived page. To post a new message, go to the current page.