Beginners - April 2012 (Page 8)

Why can't I use a for loop here?
 
It returns errors when I set up a for loop like I did below. It says error expected a declaration. Is there any reason for this? Is there any possible way I can...
[8 replies] Last: you can enter it 8 times, but it gets overwritten 7 times, so only the... (by Jikax)
Displaying a 2d array on console problems
 
Soo...I'm stuck. I keep getting silly errors(commented on function), only in the function itself. Not sure why... I don't know why it is saying it's a constant ...
[2 replies] Last: Haha I knew it was a simple thing :D Thank you kindly! :) (by eyesofhope)
by Macki
Vector Median Sort Array Prog Hangs
 
I was working on simple vector sorting.. I do know it is a no no.. and that it should be used wisely still I wanted to test vectors since with user input it he...
[3 replies] Last: Again.. working or learning to program.. at 32 can be enlightening ... (by Macki)
How can I fill an array correctly using rand() ? (I have errors)
 
Here is the piece of code that breaks the program: void SortData::randomize(int seed) { srand(seed); for(int i=0; i<maxSize; i++) theData = rand(); ...
[6 replies] Last: Thank you very much for all of your help cire! I hope that someday I c... (by Halo Fan)
Help with Strings & Functions
 
I am still rather new to programming, so if you could keep your explanations as “English” as possible, I would appreciate it! What I’m attempting to d...
[1 reply] : well your biggest problem here is that you've declared your function s... (by eyesofhope)
error c2248, please help
 
error C2248: 'record::id_number' : cannot access private member declared in class 'record' error C2248: 'record::type' : cannot access private member declared ...
[2 replies] Last: You might consider making void read_all_records a friend of the clas... (by cire)
by kethgr
Program help
 
What's wrong with my program? It will compile and run but doesn't do the calculations. It also says my variables are being used without being initialized. Pl...
[7 replies] Last: Got it. Thank you. :) (by kethgr)
by maha27
How to compare a string with file's content?
 
Hi, I am a beginner in c++. I have a file 'Names.txt' which contain a list of names. ex: Amar Aruna Ben Guru Yamini etc.. This is my pseudo code: ...
[no replies]
by Jkipod
Calculator Help
 
i wrote the code but i cant get it to restart and i don't get the wile loop's i need a little help i am using c++ 2008 express edition it says i have 3 erors b...
[2 replies] Last: i figured it out by first making the wile loop then adding the calcul... (by Jkipod)
Hangman game function issue (1,2)
 
This part of the function is where the action happens. The user has already inputted the word (word) and is now guessing the letter (guess) The guess should...
[22 replies] Last: lol... Ok. I'll take a look at it and try to see what's going on. (by Vlykarye)
Please help with Public/Private methods
 
Hello, Panicking here. My professor asked for an assignment in which we use: "Eight private methods (1 method per calculated value) to calculate the values...
[3 replies] Last: Wait a minute. I think it is letting me define it, just like any other... (by Cirabou)
Can someone help explain how time(0) works ?
 
So I am making a program which requires a timer, were supposed to use srand(time(0)) and use time and make a timer that countdowns for 3 seconds, the preferab...
[no replies]
by wdh113
Do while issues
 
The following code seems to not work...after the first do while completes it goes on to the second one although the condition isn't met...i tried putting breaks...
[5 replies] Last: @atropos- i guess ill do it that way i mean technically i am using a d... (by wdh113)
Syntax errors
 
I am getting these syntax errors and don't know why. Can someone help me out? 1>c:\users\lcmosley\documents\visual studio 2010\projects\homework7\homework7\h...
[2 replies] Last: Thanks. I am not really sure what type to declare temp? (by lcmosley)
No idea what is with this class and arrays stuff
 
Hey guys, can you help me out with this exam review question that states: Give the following declarations for a class, write C++ code where indicated. Use th...
[1 reply] : You have not even attempted to do anything with this yet - no one will... (by georgewashere)
by cokane
Truncating Issue
 
I figured my problem out, this thread can be deleted.
[1 reply] : Try parenthesizing the operands of ?: and make sure it isn't a precede... (by Zhuge)
"return" does not make the code to "return." =(
 
I keep having an error saying like this: error C2059: syntax error : 'return' I don't see how it is wrong, here's my source code I've created so far. ===...
[4 replies] Last: It is your program. I do not know what shall be there. But the constru... (by vlad from moscow)
writting a while loop
 
how to Write a while loop that determines the biggest number of positive integers. The input list ends with 0 or any negative number? just need an example.
[1 reply] : while ( ( std::cin >> number ) && ( 0 < number ) ) { .... } (by vlad from moscow)
remove command is not declared by protection?!
 
Using Visual Studio 2010. How can I solve this problem? Tnks 4 your attention and support
[1 reply] : i would just get code::blocks. VS C++ is my mortal enemy too. (by IWishIKnew)
;
 
;;;
[3 replies] Last: Oh, right, sorry. Let's step back a bit. I, personally, think your ap... (by closed account zb0S216C)
April 2012 Pages: 1... 678910... 66
  Archived months: [mar2012] [may2012]

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