Beginners - June 2008 (Page 6)

Getting user input
 
I want to get a line of the user input. What I am doing now is: string str; cin>>str; However, if the input is :This is a input. str will only be "...
[5 replies] Last: Thanks (by cjzheng)
how to put high scores in a c++ game?
 
can somebody help me please? thanks in advance!
[3 replies] Last: See http://www.cplusplus.com/doc/tutorial/classes.html fro more on Cla... (by Faldrax)
ISO C++ forbids comparison between pointer and integer
 
I'm getting a comparison b/w pointer and inter error and not sure where the problem is. #include<iostream> #include<fstream> #include<iomanip> using namesp...
[2 replies] Last: Please use [ code ] tags. You should compile with all warnings en... (by Duthomhas)
i need something to not make my program not close right after i run it
 
hi i am new to c++ and i just downloaded it and started a guide to it. after a few pages in it, it showed me a hello world program. I have dev c++ 5 when i run ...
[1 reply] : Have a look at this thread, this problem has been discussed at length ... (by bnbertha)
Trying to make a VERY basic cipher program
 
im trying to make a cypher program, and it was working, now its just showing numbers. dont get me wrong, i know y it is showing numbers (dont know how i got tho...
[10 replies] Last: ....and endl flushes the buffer and puts in a new line. Flushing th... (by bnbertha)
Program is giving wrong values!!!
 
Ok, so I'm making a battleship game and I've only gotten to the point where the user enters his or her coordinates for the ships. It would take forever to expla...
[3 replies] Last: Sorry, I didn't actually read the code very carefully because I had ju... (by Duthomhas)
expression without initialization
 
Hello mates.... lets say i have 3 int arrays and are initiated like int a ={A,B,1,0}; int b ={C,D,0,1}; int add ; int A,B,C,D; with A,B,C,D declared a...
[10 replies] Last: http://www.cplusplus.com/forum/articles/2473/ I have made a small p... (by Zaita)
Switch statement not working
 
Ok, so I'm trying to get the user to enter a coordinate like E4. So I made a switch statement making all of the letter values from A-H (lowercase too) numbers. ...
[6 replies] Last: First of all single letters are stored in a char variable type which... (by bnbertha)
Trouble with array
 
Hello! I have filled an array with 100 random numbers beetven 1 and 6. Now i want to count how many of each i have and print the result such as: You have ...
[3 replies] Last: Your best approach would be to use a map to achieve this. e.g. ... (by Zaita)
passing array element to switch
 
Hello, I was wondering if anyone knows if you can pass an array element to a switch statement. For example I have an array of int's from 1-12. I am trying to...
[3 replies] Last: Wow, fast! It occurs to me that I didn't actually answer your quest... (by Duthomhas)
by Silvah
Accessor Methods w/undeclared identifier error
 
Hello All, I am very new to C++ and have been working through some of the class method projects. I am having a issue with one that I cannot seem to figure out ...
[2 replies] Last: Thx for the reply Faldrax. I thought I tried that before but maybe i... (by Silvah)
Class project
 
I have a class project that requires loops and nested loops...I think it'll be much easier if I showed you: PLEASE READ CAREFULLY! At Valence community...
[11 replies] Last: Any chance you could edit the post with the code in to format it ? Pu... (by Faldrax)
drawing problem
 
my hangman games works but i need to get the drawings printed according if right guess or not any ideas how i could do this #include <iostream> #include <f...
[1 reply] : In previouse posts you had a single function with a switch statement, ... (by closed account z05DSL3A)
by Venged
Any idea's on a program?
 
Any one have any idea's on a program a beginner should write... no no a helloo world one i mean a real program that would be easy and help me learn off of. If ...
[6 replies] Last: +1 for Sudoku Solver. It's a good project a beginner could do. (by Zaita)
How to append output to prev. output?
 
#include<iostream> #include<fstream> #include<limits> using namespace std; int main() { string s, t, u, b; bool a = true; cout << "Welcome to the ...
[9 replies] Last: Heh heh, messing up is part of the learning process. Just keep regular... (by Duthomhas)
hangman game drawing
 
my code works for hangman game, all i need now is to include the drawings after every guess, what would be best way to do this? should i use switch statement li...
[3 replies] Last: the game works, now i just need to know how i should loop to get the d... (by chosen1)
hangman game problem
 
i have a text document with 10 words to guess. i have the code already read a random word from the file. then the user guesses a letter and it finds whether or ...
[4 replies] Last: Use a loop. (by Duthomhas)
Question about overloading operators
 
Hello, I have a question about overloading operators, what is the point? I tried a program that uses it, and it works... but when I comment out the overlo...
[7 replies] Last: Yep. :-) (by Duthomhas)
Exit y/n coding (1,2)
 
How to make a program ask for this when its finished executing: Exit? (y/n) i got this: int Exit() { char exit; cout << "\n\n"; exitloop: ...
[27 replies] Last: One post at a time. :0) All the best threads unravel to reveal som... (by closed account z05DSL3A)
by Venged
what is wrong with this code?
 
the last } seems to be the problem but why? /*AvRAGE a average program*/ #include <iostream> using namespace std; int main(void) { system("TITLE...
[4 replies] Last: That code looks frighteningly similar to one of the tutorial videos on... (by QWERTYman)
June 2008 Pages: 1... 45678... 13
  Archived months: [may2008] [jul2008]

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