Beginners - July 2010 (Page 14)

getline
 
Hello, i've used getline several times in my code witout any problems, but for some reason when i ...
[3 replies] Last: Thanks guys, that did the trick. (by Mike200)
Unable to pass correct class pointer
 
I am currently working on a small game manager for my young nephews games, mainly as a project for m...
[10 replies] Last: You are trying to push a std::string onto a People* vector. You need t... (by Galik)
Addition of two matrices
 
I have many errors in the following code.Could you suggest a better way to overload '+' in this clas...
[6 replies] Last: Only the last element of the array is added: class matrix { publ... (by manasij7479)
Switch error
 
I'm using the following code in my program to exit, save, and stop/start but i get an error saying "...
[6 replies] Last: tq jammas..but i did'nt really understand..huhuhuhu i'm sorry.. (by afiqah)
by Suzie
convert a variable
 
Hi to all. Im very new to any sort of programing, so please dont laugh at my naivity. I have som...
[10 replies] Last: [quote=Suzie]m4ster r0shi sugar Stop it... I'm blushing... (by m4ster r0shi)
Sig Error: Testing out a matrix class
 
*sigh* I'm stumped. I'm attempting some practise problems to get familiar with classes, but I keep g...
[6 replies] Last: Oh Ok, I think I get it. The copy constructor is only used to initiate... (by sonic1015)
Optimisation
 
Hi every one! I've wrote this (see code below), and i have some questions: * is this code safe...
[8 replies] Last: It is also a violation of the standard to call main. ! Didn't kno... (by firedraco)
by michy
virtual function
 
hi, its me again =D... about virtual function, all i know is: class A{ virtual void display(){ ...
[1 reply] : Yes. It's the type of object the pointer points too (class B), not ... (by binarybob350)
by michy
operator overloading
 
hi folks, today i meet a new problem again... =) about operator overloading, as i know: student...
[7 replies] Last: Also, remember that rhs is const , so your (point) + operator shoul... (by Duthomhas)
static object
 
Dear Experts, what is the purpose of declaring a C++ object as static. when to declare an object...
[8 replies] Last: thanks alot for the information.... appreciate it (by michy)
clock
 
hello i'm trying to make a digital clock. but when i compile i get this error: [Link error] unde...
[1 reply] : Your project is set for windows application you need to change it to c... (by binarybob350)
Expression: vector subscript out of range
 
I'm curious why if i want to do this with vector(which holds strings) if(vec =="0") ... Error pro...
[3 replies] Last: It should be if (i==0) { ... The semicolon at the end is wrong. Also,... (by Athar)
taking input from a file
 
I have a file with the following data(each data type separated by a tab space) file name: test1.t...
[1 reply] : For reading in the first two parts, you could use an std::string. If ... (by firedraco)
New operator
 
Hi, When I run following program... using namespace std; int main() { int *p =new int; ...
[1 reply] : delete p; doesn't change the pointer in any way, it only releases the ... (by Athar)
why wont you work?!
 
this code is intended to print out an amount entered for a check into words. however, when a user ty...
[1 reply] : The problems lie in the 'display words' section. cout << textnum <<... (by hamsterman)
Memory management and std::vector.erase()
 
I'm trying to use std::vector to hold a 'PhysObj' class to be used in physical simulation. My vis...
[no replies]
by Wander
Multi-dimensional Array
 
Hey, I'm trying to create a program that holds map coordinates and allows the user to pin-point c...
[3 replies] Last: See: http://www.cplusplus.com/doc/tutorial/dynamic/ (by firedraco)
by EEmsu
Using eof() function displays numbers twice?
 
I have a text file with the numbers: 256 314.654 When I run my program it displays: 256 314.6...
[2 replies] Last: Because eof is only set when you try to read beyond the end of file ... (by guestgulkan)
SDL Trouble
 
I'm not sure if it's appropriate to post SDL problems here but I thought I'd try. I don't know much ...
[6 replies] Last: Just flush it, that's what std::flush is for. Opening/closing files l... (by firedraco)
arguments to main()
 
I have a header file & implementation file called by a file containing my main function. Once I buil...
[8 replies] Last: Yes... I was wondering if jsmith would pop up with a link like this...... (by m4ster r0shi)
July 2010 Pages: 1... 1213141516... 31
  Archived months: [jun2010] [aug2010]

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