Beginners - December 2011 (Page 9)

by miscue
Trouble writing function for net pay amount
 
I have been working on this code, but I am having trouble writing the function for net pay. I had some help with this, but I don't really get how to do this. an...
[4 replies] Last: Thank you....I clearly do not understand C++ as well as some people. (by miscue)
by mangas
I am having a problem with classes Please help
 
I really don't know how to do multiple classes. I am trying to write animal game which Am I meat eater or Am I mammal or Am I have four legs. there are 8 ...
[18 replies] Last: That's because you are not overwriting one or more methods declared as... (by bbgst)
Is this possible?
 
I need a global function: void print_stack( Stack const* pstack ); to print out each element of a list. It needs to access private members. Can it be a frien...
[10 replies] Last: got it with this: pstack->head.pnext->data Now I just have to figure... (by AndroidZ)
by kinley
Use of new in CPP
 
Hi, I wanted to know about the use of "new" in CPP; Please consider the following program: class ITEMS { string name; public: void...
[7 replies] Last: Always prefer method a. With method a, the object is created on the s... (by moorecm)
by skew
byte shifting operators for iostream
 
in other languages, the << and >> operators are used for shifting bytes. in c++ it is also possible to use the two operators for byte shifting, but also for pri...
[7 replies] Last: [quote=Disch]Have you ever tried to create your own iostream-derived t... (by Cubbi)
Lvalue required....
 
struct student { char first ; char last ; } stud_1; main() { stud_1.first = "James"; strcpy(stud_1.first, "James"); cout << stud_1.first; g...
[14 replies] Last: Seriously, look into getting a modern compiler. If your compiler cann... (by cplusx2)
Passing by value vs reference
 
So I understand the purpose of each, but do you ever HAVE to pass by reference? Let's say you have int x = 12; int y = 24; testFunc(x,y); ... ... ...
[4 replies] Last: Passing by value copies the value itself, while passing by reference b... (by Catfish)
Someone with glut and sdl please run this
 
I am a rookie making a 2d game and i am just completely dumbfounded on what is going wrong here with the mouse. Any recommendations would help. // specif...
[1 reply] : I just posted in your other thread about this: http://cplusplus.com... (by Disch)
by cheZ
Need help with linking error.
 
I wanted to try to make a simple factoring program just to try to use a class in a separate file and try using a constructor. When I try to compile I get this ...
[11 replies] Last: I'm not questioning that. I'm saying that in this case, I used it as a... (by ciphermagi)
Data Storage in C++
 
I recently learned that PHP uses classes in a similar way as C++. One can combine that feature with SQL to access databases. I think that is pretty powerful. ...
[2 replies] Last: Thank you, Alrededor. I think I will be able to use the MySQL interfa... (by nathan10)
by Fotis
Simple guess number game
 
Hi programmers! I'm new at c++ and i want help about a simple guessing number game. I want: the player has 3 tries (the number is between 0 and 20) if player ...
[6 replies] Last: First thing I would do is, if you really want to be able to repeat the... (by ciphermagi)
C++ Inheritance question
 
Hi, I got a question about inheritance in C++ For example, I got a derived class and a Base class. The base class got a constructor like this: ...
[10 replies] Last: I didn't noticed Athar's reply ;) (by TakeShi)
OpenGL 2d turning
 
I am trying to make a quick program where my square in the center of the screen will go towards the position of my cursor. I can get it to, but if the cursor is...
[13 replies] Last: Hard to debug without seeing pics/code. (by Disch)
by ffaora
Complex string problems. :(
 
So, the ask: "A file stores competition's participants information (eg: SURNAME/Country; VENUS/England). Find all surnames from England that are word-polindrom...
[7 replies] Last: I know the algorithm, what I do not know is how to pull it off in C, o... (by ffaora)
by Delca
Recursive class method crashing the console
 
Hi everyone. While I have some experience with C, I am learning C++, and didn't found anything on the Internet about my kind of problem (or rather, solving it t...
[4 replies] Last: I think you got it right. The problem was in ~node(), which tried to d... (by Delca)
Damn! I need help!!
 
OK, so, I'm a beginner in C++ programming and while I was just testing myself, I decided to create a simple program that when I enter the number "3000", it will...
[5 replies] Last: Thanks, Moschops. It worked! (by infinitymode12t22)
Suduko
 
Im trying to make a suduko puzzle solver and my current input takes to long. I want the user to be able to enter the input. I use int Board to represent the b...
[2 replies] Last: u can use keyboard interrupt.....for which u require the following: #i... (by mj1709)
by applee
Initialising variable with return value from a function
 
Hi! I'm wondering if it's possible to initialise a variable with a return value from a function like this: int function() {............. return a;} int ...
[4 replies] Last: Yeah, I thought that as soon as I posted it, but left it there, lol. (by Lynx876)
How to create series of input numbers? (1,2)
 
Hello everyone, i'm been practice C++ for a while just a new hobby in technology. i start with mathematics with numbers and some cout, cin function in oth...
[30 replies] Last: @Aramil I know that, but the OP was asking why the code he posted was... (by Dacster13)
Stack around variable 'Stars' corrupted.
 
I'm new to handling this type of error but from what I understand it seems to usually be a problem with the scope of a variable. For example writing beyond the...
[11 replies] Last: I tried changing the <= to < again just to make sure I wasn't going co... (by jamesbouckley)
December 2011 Pages: 1... 7891011... 47
  Archived months: [nov2011] [jan2012]

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