Beginners - July 2009 (Page 3)

I'm in a C++ class, stressed out of my mind about C++ classes...
 
C++ classes are confusing on their own, but I need to modify a earlier program, modeling it via classes instead of just structs. How do you make something li...
[2 replies] Last: Structs were also troublesome for me... http://pastebin.com/m6539ef... (by steinzfan)
by burner
console calculator issues
 
Hello, I am very new to C++ (I've only been using it for several hours), and I need some help. I want the console app to calculate the area of a rectangle u...
[11 replies] Last: As firecraco said cin.ignore() ignores 1 specified characeter, or '\n'... (by mcleano)
by MiaZas
push_back
 
I have a string which a user entered called "Input" and I am wanting to at some point add a 'k' onto the end. But when I use push_back, it adds a space between ...
[2 replies] Last: void enterString(string &Input) { cout << "Enter a string: "; ... (by MiaZas)
UART divisor in serial RS232 C programming
 
Hi, I can't figure out how to set a baud rate in C programming, I'm not looking to use the standard rates. I need to set the baud rate to 8226.6, I can do th...
[1 reply] : Perhaps it would be better to post this in a forum that deals with C h... (by smilodon)
by rain
How to print file on command line?
 
I tried thiat example http://www.cplusplus.com/reference/clibrary/cstdio/fread/ but it dont print text on screen, how I can change it to do it?
[1 reply] : That shows how to get the file contents in a buffer, you need to print... (by Bazzy)
Initialize a dynamic array of structures
 
I have been following C++ primer plus by Stephen Prata and am having trouble with an exercise relating to creating a dynamic array of structures. To be more spe...
[2 replies] Last: Ok. thanks for the quick reply. (by catnsmith)
What happened to the "N"?
 
I'm working my way through Learn C++ in 1 hour a day. In chapter 4, exercise 7 I had a small typo. I fixed it easily enough, but I'm somewhat mystified at t...
[3 replies] Last: It is as mcleano says... at that point String2 is an array of 1 charac... (by jsmith)
Please read this...i am newbie
 
i am newbie in c++.. i have trouble in my program... i confuses in this...why my program can't continue...just keep in main page...please help me..thank you ...
[12 replies] Last: Yes, why are you recursing? You'll get a stack overflow... (by chrisname)
Defects in C++ code
 
Hello! My C++ teacher asked me today, what problems and defects can I see in this code: void Foo(int n) { int *x = new int ; int *y = new int ; Ba...
[8 replies] Last: firedraco.append("malfoy"); Sorry, I had to get that off my chest..... (by chrisname)
by accy
how to solve this?
 
The following is a class diagram for class textBook and the main() program. The class consists of 3 data members and 4 function members. Write a complete C++ ...
[7 replies] Last: The following is totally not a homework question. Assignment one: I... (by chrisname)
by JFloyd
If Statements, in If Statements.
 
I'm working on a simple text based adventure. I curently have the game tell you the coordinates you're at, then it checks a long list of if statements for what ...
[8 replies] Last: Oh ok. No problem =] (by chrisname)
by arash
problem with printing char in VS console mode.
 
Hello Every body, Trying to display an input to output screen , I always get the same character no matter what I have typed. #include <stdio.h> void mai...
[3 replies] Last: Us backend programmers find it offensive to imply that console interfa... (by helios)
I have an odd degub error, and I'm not sure what's causing it.
 
Here is a class for my first real project (nothing too complicated.) class player { public: string sName; int nDiff; void Giveinfo();...
[6 replies] Last: while loops check the condition at the very beginning, so if the con... (by wmheric)
by MiaZas
replacing array element
 
I have an assignment in which the user enters a string named "Input" and somewhere along the way I am supposed to find the first vowel (aeiou) and replace it wi...
[4 replies] Last: I guess that explains why it also worked when I made separate if state... (by MiaZas)
Splitting strings and atof to handle fractions.
 
I'm writing a program to convert from Decimal to Octal, vice versa, Hex to Decimal, vice versa, etc. Anyway so I was happily coding along when I realised that i...
[7 replies] Last: You may have got there before me, now that I think on it it was only a... (by chrisname)
by ryan89
struggling to start programming
 
i have just started my C++ and am yet to have any practical experience, i recently dowloaded coadgear rad studio 2009 and am trying to write the "hello world" p...
[2 replies] Last: ^^ Blitz Coder; I used to use Dev C++; it's good; but I use Code::Bloc... (by chrisname)
by cnewby
question about random numbers
 
Hello I hope my question is specific enough. I would appreciate any help with my code. In the main body, drawwheels (line 200) is supposed to call three random ...
[3 replies] Last: Man you guys are awesome! That was exactly what I needed, thanks ! (by cnewby)
A loop using an array
 
The problem I'm having is, i want an if/else statement to run until certain conditions within a while loop are met. Basically before this starts the user enters...
[4 replies] Last: Basically I'm trying to get the loop to say "While it's not equal to a... (by DragonKnight)
Syntax in Data Structures tutorial
 
I was reading through the Data Structures tutorial and noticed a peculiarity, and I'm wondering if it has any significance. here's the link for convenience: ...
[2 replies] Last: Thanks! Much appreciated. (by TheWildJacko)
by MiaZas
String array
 
Hi, I have a string which the user entered and I am supposed to find the first pair of double letters in the string and move one of the letters to the beginning...
[3 replies] Last: There is an algorithm specifically designed to help with this type of ... (by kempofighter)
July 2009 Pages: 12345... 20
  Archived months: [jun2009] [aug2009]

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