Beginners - January 2012 (Page 7)

While loop not ending.
 
Hello, I have a few problems with a program im making which is supposed to simulate a battle. The us...
[14 replies] Last: you are welcome... you do not need braces for the if statements if ... (by nooblet)
by Pi3
Return 0; Is not Working
 
// conditional operator #include <iostream> using namespace std; int main () { int a,b,c;...
[6 replies] Last: cout << c; cin.get(); // <- return 0; (by Disch)
While loop trouble
 
#include <iostream> #include <stdio.h> #include <string> using namespace std; void PrintM...
[2 replies] Last: btw, you can only return one variable. u cannot do return var,var1,v... (by nooblet)
The declaration int (*p[5])() means what?
 
int (*p )(); Whats the use of p? Explain with an example or reference.
[1 reply] : With an example. #include <iostream> #include <typeinfo> int main()... (by JLBorges)
"invalid conversion from string to an integer"
 
Here is my delima: while(((menu_choice > f_lines) && (menu_choice < 1)) || (menu_choice == 0)) ...
[1 reply] : Try something like this #include <iostream> #include <string> #includ... (by histrungalot)
Boggle Solver: Finding Prefixes in a Set.
 
This is for a homework assignment, so I don't want the exact code, but would appreciate any ideas th...
[2 replies] Last: That's exactly what I needed! Thanks for your help! (by mahuika88)
Why is this printing out twice?
 
Ok so for some reason this outputs the vector twice. Not sure why while(nameFile.good() == true)...
[5 replies] Last: nameFile.txt vector vector vector EOF 1) nameFile is opened 2) nam... (by vin)
Trying to modify a string >=(
 
string Cipher::key_rotate(string key) { char temp; char replace; int count = 0; for(int...
[2 replies] Last: Unless your intent is to learn how to implement a rotate algorithm, us... (by JLBorges)
by gbrown
Spacing
 
I am having trouble figuring out how to get a space between my output screen. I may have several lin...
[2 replies] Last: using namespace std; cout<<"\n\n"; cout<<endl<<endl; Both produce th... (by Nexius)
How to fix Errors and change my code. Tips
 
#include <stdio.h> #include <conio.h> int main() { char str ; int cnt ; int i; for (i=0;i<122;++...
[1 reply] : [co de] "Please use code tags" [/co de] 1_ If you've got a syntax ... (by ne555)
Graduation Program
 
http://www.cplusplus.com/articles/N6vU7k9E/ So I've been working through this program. Been getting...
[12 replies] Last: :O Alright cool! Thanks you two. This is probably the most fstream wor... (by ResidentBiscuit)
Problem converting string/char to int using atoi
 
I'm creating a program that solves postfix expressions. I used an algorithm that uses stacks and imp...
[2 replies] Last: atoi requires a C-String (i.e. a null character terminated array o... (by shacktar)
by amark
Insertion sort with string array
 
I am trying to sort a list of names using insertion sort. In my insertion sort function at the botto...
[2 replies] Last: okay thanks (by amark)
Help with my text game?
 
Hi I am writing a adventure game and will soon at classes and things but can you please tell me why ...
[4 replies] Last: You got lots of other mistakes in the code though once you fix the pre... (by vin)
by Zeph78
Opinion on best way to learn C++
 
So I have been talking with someone who pretty much is a programmer for some company. He told me tha...
[4 replies] Last: Thank you everyone for your opinions. Atm I am reading a book "C++ for... (by Zeph78)
I guess I don't understand enums?
 
Ok, so I'm getting some stupid errors. And I'm getting annoyed cause what I thought was straight for...
[16 replies] Last: Ah hmm, well thats annoying. I guess I dont need to do that now, I jus... (by ResidentBiscuit)
Loops
 
I'm so lost. The closer I get to the end of the program, the harder it gets. I know this is a terr...
[13 replies] Last: Why do I always make things more complicated and retarded than they ar... (by ErinCorona)
How to convert char to int?
 
How can I gather input from a user, say "1 2 3", and put it into an array of int? So far I've tried ...
[2 replies] Last: if its like "1 2 3" you can use cin and a loop to assign it to variabl... (by kapo)
Linker error: Multiple definition of...
 
I'm having difficulties understanding the following linker error: g++ -g -Wall mycompmain.C comple...
[3 replies] Last: The file complex.H is indeed included in both complex.C and mycompmain... (by yshicht)
Using rand() to assign enum
 
Ok so I have a couple enums right now, and I need a way to randomly assign one of a few different op...
[2 replies] Last: Great! That worked, thanks :D (by ResidentBiscuit)
January 2012 Pages: 1... 56789... 48
  Archived months: [dec2011] [feb2012]

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