Beginners (Page 107)

New! Join the C++ community on Google+
by Gomboo
i cant find my mistake .....pls check it
 
#include<conio.h> #include<iostream> #include<iomanip> #include<string> using namespace std; cl...
[4 replies] Last: You still did not place it in code brackets and did not tell what the ... (by ryancb06)
Function that doesn't allow user inputted negative numbers
 
I'm trying to work a function into my program that won't allow the user to input a negative number. ...
[5 replies] Last: First, modify get_non_negative() to accept and return a non-negative... (by JLBorges)
finding gcd
 
I have a code that finds the gcd of two numbers, I know it works, but dont understand how it is fi...
[2 replies] Last: http://en.wikipedia.org/wiki/Euclidean_algorithm (by JLBorges)
Function for getting player names not working, suggestions?
 
I am trying to write a game(for my class) that can have between 1 to 4 players. I use a string for e...
[3 replies] Last: I figured it out. A \n remained in the input stream from a previous in... (by drakescale)
Putting a sentence into a 2D array
 
I want to input a sentence in exactly 5 words. The sentence splits into strings. These strings will ...
[no replies]
Checking the file
 
Hello, I'm having difficulties trying to think of a way to check if a file is empty or not. I have ...
[8 replies] Last: I don't see how you rewrote the if. It looks exactly the same. Yo... (by AbstractionAnon)
by nexos
need help with fractions
 
......I need help to shorten my fractins.......here is my code #include <iostream> #include <c...
[no replies]
Extern with Class Objects
 
I get the error "error C2512: 'Button' : no appropriate default constructor available." I've tried i...
[2 replies] Last: You haven't show us the declaration for your Button class. At lin... (by AbstractionAnon)
file input of mixed types
 
I am writing a program where I need to handle an inventory file of mixed types integers and strings....
[6 replies] Last: int main() { string line; ifstream infile; int num, ... (by AaronTrahan)
fstream and string getline problem
 
Having something of a problem with an exercise. The program is meant to read in a series of names an...
[6 replies] Last: Yup, that's exactly what my txt file looks like, with the first line b... (by Raezzor)
Calculations coming out wrong
 
I am implementing functions from a header file I have been given, and I can't figure out why the num...
[1 reply] : Square::Square(float initialDim){ initialDim=dimension; } If you ... (by cire)
Cin gets ignored ?
 
Same story again. In the void nfile() and in ofile(), the program gives the output but ignores the i...
[1 reply] : http://www.cplusplus.com/forum/articles/6046/ You need to clear the i... (by Moschops)
Symbols
 
I see these 'symbol' things (dont know what they are actually called...) and I get confused for what...
[2 replies] Last: I was typing this code, and when I used an equal sign it didnt work. ... (by Chervil)
Problem with game and cout
 
Hello. I am trying to write a game where a dot represents players position and X represent a pickup...
[no replies]
Link List Getting Invalid(garbage value)
 
]Hi there i started working on Link List but i got the invalid value in my programe.. #include...
[9 replies] Last: It will probably be easier to use separate functions to control the ad... (by Chervil)
how can i delete the specific vector?
 
when the bunny reaches the end of his life i want to delete him from the vector ive had no trouble ...
[3 replies] Last: perfect :) that was easy, i have lots to learn (by devonrevenge)
Cin gets ignored?
 
So my cin gets ignored in the void "CReturn()" I don't know to solve this one... Please can someone ...
[4 replies] Last: Thanks alot man. I'm finally over that one. Up to the next mistake (by Devilnp123)
char vs string
 
Hi everyone! I am teaching myself C++. I would like to know what are the efficiency differences b...
[2 replies] Last: Many thanks Cubbi! (by DanMachado)
Enumerations, an if statements
 
I was experimenting and unfortunately it didn't work. I tried using enumerations and if statements w...
[6 replies] Last: Ya, I had to make a couple changes to the code but it did what I wante... (by Hazique35)
Simple Question
 
Let's say i'm creating a class and i want to declare one of my "char" private variables to be "const...
[3 replies] Last: Peter87 Thank you, i removed line 8 and it worked perfectly for char :... (by Elie Chahine)
Pages: 1... 105106107108109... 114
  Archived months: [oct2012]

Cannot post in this page. To post a new message, go to the first page.