Beginners - July 2011 (Page 8)

loop question
What are the values of i and n after this loop executes? int n = 0; for(int i = 1; i <= 8; i++) { n = n + (i % 2); }
Jul 28, 2011 at 2:15am
[2 replies] Last: Or you could just print it out.. A pretty obvious way to tell. Either ... (by Turbine)
Qt4 in Mac
I have been programming in C, C++ and VisualBasic for a number of years. A couple of years ago I started learning Qt4 within Windows and I was successful buildi...
Jul 28, 2011 at 12:34am
[no replies]
by Adrio
C++ Hangman Game (1,2)
The assignment is a simple C++ Hangman game: You'll ask the user to enter a secret word or phrase, a 100 char array Any letter that gets entered will be repla...
Jul 27, 2011 at 11:52pm
[23 replies] Last: Yea got the code to work! Thanks a lot guys!! (by Adrio)
display int in char form
I can display 0-9 of integer in char form but having problem with 10 as it keeps on display : for 10. I need to put other char too so I need to use char in my v...
Jul 27, 2011 at 11:40pm
[1 reply] : There are a lot of examples of integer-to-string conversion around her... (by jsmith)
Output for different data types
In this program I am trying to get a number the user inputs to display in hex and decimal for different data types.The comment portions are the desired output. ...
Jul 27, 2011 at 11:38pm
[1 reply] : Because the std::hex manipulator only works with integral types. Note... (by jsmith)
by FGaRK
cross dependency/undefined refference problem
solution: that was dumb, i was compiling files in the wrong order i'm not so great with forward declaration and cross dependencies: [quote=error]$g++ un...
Jul 27, 2011 at 11:32pm
[4 replies] Last: Linking and #includes are totally unrelated. The problem is in the in... (by jsmith)
problem with SDL screen
The problem is that it says screen cannot be evaluated in this function void Graphics::ClearScreen() { SDL_FillRect( GetScreen(), NULL, SDL_MapRGB( screen...
Jul 27, 2011 at 11:31pm
[7 replies] Last: EDIT: i forgot accidentally fucked something up before. Now when it ge... (by nano511)
by acorn
i dont understand why this code behavies the way it does
#include <iostream> #include <limits> using namespace std; int main(int argc, char *arv ) { cout << "enter 1 or 2: "; int response; cin >> response; i...
Jul 27, 2011 at 11:14pm
[6 replies] Last: thanks zhuge i feel like an idiot now. (by acorn)
by kulsub
linked list problem
hi guys. I created a simple code to build linked list.The use enters three data items , and these form a 3 elements single link list. following are the various...
Jul 27, 2011 at 10:55pm
[4 replies] Last: hi hamsterman, thanks a ton. I understood. with three declarations, i... (by kulsub)
Help With Print Report for an Array
This is what I so far! I need help printing a report that looks like this : Class Report Test # ...
Jul 27, 2011 at 10:34pm
[no replies]
please help on this
i have got time stamp in this format ( 2011-07-05T20-56-32Z) by the another function. i want to increment the seconds by 1 sec each time until 59 and after ...
Jul 27, 2011 at 9:11pm
[1 reply] : basically the question is ..write a function which parse the string an... (by surajsahu06)
by Adrio
C++ Urgent Hangman Game Detail Help
So I am having a lot of trouble with this use of char arrays. I still haven't figured out how to make the game tell the user if he has already guessed that lett...
Jul 27, 2011 at 9:05pm
[4 replies] Last: so im about 2-3 days new to c++ and thought this was a fun post for me... (by alwayslearning79)
True/False Test
I am writing a program to grade a True/False test. I have to read the students answers from an input file and output them, along with their percentage and lette...
Jul 27, 2011 at 8:35pm
[5 replies] Last: Finally, after a day of not knowing what went wrong, I found it and of... (by Maese909)
Homework question PLEASE HELP!
Only kidding. What is the best way for getting the last element of a C++ std::string ? I can think of two methods but I'm unsure whether the second is relia...
Jul 27, 2011 at 8:03pm
[1 reply] : option 3: str.back(); All 3 will work fine, as long as the ... (by Disch)
Web Requests and Proxies
Hey, I'm pretty new to C++, however am reasonably experienced with PHP and Expression 2 (Garrys Mod code language). I am most interested in making things ...
Jul 27, 2011 at 8:02pm
[3 replies] Last: Yes, this site should help: http://www.ietf.org/rfc.html. (by kooth)
by xen
Help Writing Program From Flow Chart
I need help creating a program based on the following flowchart: http://dublee.com/prog/examgradecheck.jpg I put the following code together but I am not ab...
Jul 27, 2011 at 7:56pm
[5 replies] Last: That's right. Good catch. I'm learning, too, so you taught me somethin... (by gmorris7897)
ERROR C2664
any idea why I am recieving this error? void BankingSystem::loadFromFile() { string fileName; cout << "\nEnter the filename (.txt): "; // user i...
Jul 27, 2011 at 7:46pm
[2 replies] Last: thank you (by PCwake90)
help please
What are the values of i and n after this loop executes? int n = 0; for(int i = 0; i < 12; i++) { n += 3; }
Jul 27, 2011 at 7:16pm
[2 replies] Last: The loop executes 12 times. Each time n increases by 3. n starts as 0 ... (by Anon1010)
please guide me as what is the not working
its a menu driven program. the user enters 1 to insert element and 2 to display. after I entered more than 1 element.and pressed 2 to display it only dislayed ...
Jul 27, 2011 at 7:15pm
[no replies]
by Brad1
Help!
What are the values of i and n after this loop executes? int n = 0; int i = 10; while (i > 5) { n += 4; i -= 2; }
Jul 27, 2011 at 6:59pm
[1 reply] : cout after the loop to check the values. (by Intrexa)
July 2011 Pages: 1... 678910... 54
  Archived months: [jun2011] [aug2011]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.