Beginners - September 2014 (Page 23)

if/else with "or" operator
 
In my code below, I want to be able to enter invalid ages for the first "if" over and over again and still get a prompt to enter an age, but so far if I enter a...
[5 replies] Last: Thank you! Figured it out. (by JoJodoggy1)
Displaying more rows
 
Hi. I am a new programming student. Recently I have been facing problems using for loop. My assignment is that if I input 3 then a square of 3 x 3 will be dis...
[3 replies] Last: Actually when I felt desperate last night, I went to bed. And then I t... (by ichabodgrant)
Class Error
 
Can somebody please explain why I get this error: no matching function for call to 'Quizdata::Quizdata()' #include <iostream> #include <string> using na...
[1 reply] : On line 23, you are trying to default construct a Quizdata object, but... (by Zhuge)
by EvE12
Compiling problem
 
I don't know why this doesn't compile with me it gives me this error:- undefined reference to `Sally::Sally()' undefined reference to `Sally::printCrap()' ...
[7 replies] Last: Try doing a struct instead.... just a suggestion Classes seem to give... (by TheBadCoder)
Questions about char vector
 
OK. Here is my problem. One of the exercises in my book wants me to write a program. It basically boils down to this. It wants me to take a input of a number of...
[2 replies] Last: Thank You! I have skimmed over this code like 20 times. I am a blind u... (by mattbrad83)
Visual Studio 2013; Input won't work
 
I'm using sample code from this site, but can't get the program to do anything with input. If I type, whatever I type just shows up. If I type 8, all I see is t...
[3 replies] Last: The program gets closed when you press enter, but it still reads and p... (by S G H)
by Daviid
I need a little help with a rock paper scissors game
 
its not supposed to be rock paper scissors yet, were just making something similar. But im having a problem with an infinite loop and i was wondering if someone...
[4 replies] Last: @David Look at lines 31 and down, If i type N, will it actually get ou... (by closed account EwCjE3v7)
by Nezar
the order of the initializer list
 
Hello there, I have read that the order of the initializer list in the ctor should follow the order in which the data members were declared, but i don't get an...
[5 replies] Last: one quick thing: in the gcc documentation it says that library files d... (by TheIdeasMan)
What's the glitch?
 
#inlcude <iostream> #include <cmath> using namespace std; int main() { for (int x(0); x<6; x++) { cout<< "\t" << x << "\t"<< sqrt(x)...
[7 replies] Last: Thanks LB (by Knightrider29)
Struggling with Accelerated C++
 
Hey guys I'm 21 old, Well I have been studying Accelerated C++ for the past 1~2 months and I'm really having a hard time regarding the exercises from the book. ...
[2 replies] Last: Yes, I always read and attempt to do what the exercise asks before I h... (by raymondtfr)
Segmentation Fault (Core dumped)
 
I am going nuts finding out where the memory allocation error is here. This program reads checkerboard data from a file into a 2d array, then uses recursion to...
[13 replies] Last: You guys are seriously the best. I am extremely grateful for you help!... (by bwilfong3)
reading specific lines from .txt
 
How can I ignore the first xy row while reading from a .txt (start reading from the (xy+1)-th row)?
[3 replies] Last: thank you much. (by alpihun)
Need help with my progressbar and textbox
 
Hello guys, The things i use in this little program is a progressbar, button, timer and a textbox. My progressbar is working when i press on the button. But wh...
[no replies]
bubble sort vs selection sort
 
Why do I get a different order for the different sorts? I pass the exact same array of strings into both of those functions, but they put the array in different...
[1 reply] : If they put the arrays in different orders, then one or both of them i... (by LB)
Sorting an array of strings
 
I am getting an error for my sort function and I don't understand why. It's also not sorting the array at all. I'm trying to sort an array of random strings. ...
[8 replies] Last: [quote=mtbrooks1993]It would be more efficient for it to break out of ... (by LB)
weird glitch in program involving fstream
 
I don't understand it and I will try my best to explain it. I have a program that reads a text file with <fstream>. In my program I iterate through each charact...
[3 replies] Last: I don't like to answer Qs in PM. If you can't post it publicly then I... (by Disch)
Why am I getting inf as an output
 
I should be getting normal numbers, since I am just computing an interest rate. float invContComp = (inInvest)*pow(2.71828,(intRate*numQuarter1)); ...
[6 replies] Last: Make a debug output right before invContComp calculations. Tell what ... (by MiiNiPaa)
Errors in my game of pong.
 
Hi, I keep getting the error message "error C2143: syntax error : missing ';' before '.'" I am making a game of pong and honestly have no idea what could be cau...
[2 replies] Last: Thank you! (by JackMorrill)
The difference of 2 functions
 
Hello. What's the difference of this code: int pop() { int val = array ; --count; val = array ; return val; } To this code: ...
[6 replies] Last: Unfortunately yes. It's just that the first one tried and failed where... (by LB)
Make is not generating dependency files
 
I'm trying to use make to build dependency makefiles by following this: http://www.gnu.org/software/make/manual/make.html#Automatic-Prerequisites here is my m...
[1 reply] : This is the instructions that I have followed and it has worked great ... (by Peter87)
September 2014 Pages: 1... 2122232425... 51
  Archived months: [aug2014] [oct2014]

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