Beginners - September 2012 (Page 13)

how to loop and print 3 char's at a time out of a sequnce of characters
 
I'm trying to create a for loop that loops through a string of chars imputed by the user and i want it to cout<< the arrayor string of chars three characters at...
[3 replies] Last: thanks fellas!!! (by ApacheOmega)
by bujiko
Rotating Points in a Class
 
Hello :) So my assignment had me create a class for a 3 dimensional point system and initialize it to zero. It then has me add 2 to each point, then rotate it...
[6 replies] Last: I did a static_cast to int at the end to check and it made it zero so... (by TheIdeasMan)
Is there a way to return to a certain point in my code?
 
Hi I am fairly new to c++ and am just writing some codes for practice and I was wondering if there is a command I can use to move the program back to a previous...
[3 replies] Last: thank you (by Mangold)
Where should delete my pointer in this program?
 
Hello all! I've been working with a book, learning about overloading operators. I went a veered off the path and went ahead and made "itsAge" into a pointer...
[4 replies] Last: Would overloading the assignment operator and using it correctly fix ... (by Athar)
Slight compilation problem in my Yahtzee program.
 
Hey all! I have a couple problems regarding this Yahtzee program I am making for class. But I cant seem to fix the issues. It Should out put like this Turn...
[2 replies] Last: Wow I cant believe I didn't see that! Thanks a ton man! (by darkrin4)
Repeating a question, not asking an identical question
 
How do I repeat a question to the user? I don't want to ask an identical question I want to repeat the same one. I have written my code so it will ask a que...
[3 replies] Last: bool valid = false; string answer; do { cout<<"Question: ..."<< en... (by Aramil of Elixia)
"Run-Time Check Failure #3" -- variables cannot be initialized
 
I am trying to write this program that finds the area and the perimeter of a specific figure. Everything seems to be working other than the fact that it keeps t...
[3 replies] Last: I GOT IT!!! THANK YOU SOOOOOOOOOOO MUCH! :D (by tpslugger)
Expected Primary-Expression before "char"
 
Hello, all! I'm currently writing a program for my C++ class... Unfortunately, I have run into an issue that I can't seem to solve. I'm sure it's an easy issue...
[2 replies] Last: Ah! Thank you for the quick reply... I need to print out a list of the... (by ElectroPulse)
stringstream in an array
 
Hey guys, I've been trying random ideas to parse a string of numbers into an array for a couple hours and I'm still bugging out. This is the last thing I'...
[2 replies] Last: Thank you so much that works! (by jktexas1)
Can this be cleaned up/improved? And an unrelated problem...
 
Hello all, I'm in a C++ class for this fall and have been working on a few questions that I have given me a bit of trouble so soon into the class. I had ...
[5 replies] Last: It repeats because you are using a loop that repeatedly reads one char... (by Zhuge)
Need Help looping
 
How would I condense this into loops so I don't have to repeat all this code? And no I don't want to call a function. Just loop :) Thanks. I am just not sure ho...
[10 replies] Last: i did the above but it didn't work for me. it just got messed up from ... (by skittlesaddictx50v)
Loop
 
Is this possible to condense down into a loop? if (selection_two == 0){ user_winnings_two = 100 * multiple_chips; } if (selection_two == 1){ user_winn...
[1 reply] : the simpliest way is to use an array: int multiples = {100,500,1000... (by tntxtnt)
by ymdeek
need help with this program
 
kkkkkkkkkkkkkkkkk
[1 reply] : What happens if userChoice < 1? Add a default case. For if (userIn... (by TheJJJunk)
by mHart
Discount Problem Please Help ASAP
 
Basically we have this program that asks the user to input the number of pages and number of copies he/she would like printed. There is also the option to have ...
[9 replies] Last: Good catch TheJJJunk! I missed the Tpages line. (by leftcoast)
separating a string by \n!!
 
I am trying to separate a input string by \n ! I used getline function to get input. e.x if I type "I am going to school\ntomorrow", I want to separate this i...
[6 replies] Last: I read my HW question again and I was misunderstood the question!! I t... (by munjo5746)
Please Help asap, extremely frustrated
 
I am working on a simple Population class program that would succesfully read in info to the object data and then succesfully print them. I am an extreme b...
[17 replies] Last: thanks guys! its working perfectly now! I havent learned this sstream... (by busturdust)
Displaying the lowest number
 
I'm trying to input three numbers then return the smallest number. The program will not compile. #include <iostream> using namespace std; int small...
[7 replies] Last: SmallestNum is a function. Functions cannot be declared/defined within... (by soranz)
parsing string of numbers to int array from file
 
Alright, so I'm given a file with the format, "NOT 10000111" the commands and numbers change from line to line, obviously. I've had no trouble reading the c...
[no replies]
pass function paramaters by reference
 
Hello, I created the following code to pass the the variable 'inputVoltage' by reference to the function 'input'. It certainly seems to work when I run the prog...
[5 replies] Last: They both work. Except it is very easy to confuse the * 's and & ... (by TheJJJunk)
Using a char array
 
So I am working on this program for class to use a struct to make a student record with assigned values and then generalize the program so the user can enter th...
[11 replies] Last: Yay! You are right. No errors. Thanks for all the input, I am pretty n... (by homestar319)
September 2012 Pages: 1... 1112131415... 62
  Archived months: [aug2012] [oct2012]

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