Beginners - April 2010 (Page 25)

global variable outside a class??
 
i had a global variable but not above int main(), but above a class,something like this //global variable int* map; int MAX_WIDTH; class map{ //definito...
[2 replies] Last: I also want to insert it to my class, but something i forgot to tell y... (by anis135)
approximating Pi
 
I'm having trouble I cant get it to output the correct value for pi and its driving me crazy what am I doing wrong? The program is giving me the the final va...
[4 replies] Last: I couldn't get the it to output the correct values so I reworked my eq... (by xxlt3xx)
calculator using prefix & postfix
 
I need your help to programe a calculator that can sovle mathe problems with prefix & postfix. help me as soon as possible
[1 reply] : http://www.cplusplus.com/articles/how_to_ask/ (by Bazzy)
by Aseel
While loop
 
Hi Programmers, I'm writing a program to read text file and display it on the screen but it just works for the first time and if I tried again it doesn't di...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/files/ 1. once you hit the end ... (by DrakeMagi)
displaying time variable if time is between x time and y time
 
Hey sorry if the name is stupid, but I'm really not too sure what it is I am trying to do, I'll try make it easy to help. I basically have something like this ...
[no replies]
references/pointers
 
Hey, For an assignment I have to use this method : std::string& RowIterator::next(int& columnNr){ current=current->next; columnNr=current->columnNr; ...
[2 replies] Last: Since I have to respect the signature of the method, I have to return ... (by Stiltzkin)
CLASS AND VECTOR
 
Hi . I Need some Information about how too assigne a class to a vector class A { protected: string name; }; class B : public A { ...
[3 replies] Last: Additionally, be sure to delete any memory allocated with operator new... (by moorecm)
by bnd
Polymorphism & Assignment Operator Overloading
 
So I'm totally confused about how to go about this. I have something like: class parent { public: virtual parent& operator=(const parent&)=0; }...
[7 replies] Last: You can always do something like this: #include <iostream> using ... (by m4ster r0shi)
by jagy96
Array of Classes, Inheritance constructor number funky
 
I am making a program based on a marine eco system. After entering the numbers Plants = 1000, Goldfish = 400, and Redfish = 2; My constructors are not being cal...
[2 replies] Last: Organism *R, *G, *P; P = new Plant ; G = new Goldfish ... (by Disch)
by pika
How do I save a text file where the name of the file is defined by the user?
 
simple question, but... Here's the function: void save_file(string fileName) //saves the file to file fileName.txt { fstream myfile(fileName); if...
[13 replies] Last: Thanks! Works great now! (by pika)
by Loloda
What C++ software to buy?
 
Hi everybody, I want to order the following book "C++ Programming: From Problem Analysis to Program Design (Author D.S.Malik)" from Amazon.com to learn C++ pr...
[7 replies] Last: Microsoft Visual C++ Express / Code::Blocks with Mingw Compiler both ... (by blackcoder41)
by SoloXX
Wrong output in "finding smallest number"
 
Hello, I am in a beginning C++ class and there is an issue I've been having with one particular switch statement (case B, in my case). When I put in an unkno...
[4 replies] Last: Really? Indentation has that much impact on correct execution? Wow! I... (by firedraco)
error: no matching function for call to ''
 
Hello, i am new to this forum and trying to create a merge sort function. Upon testing, i get this error. " error: no matching function for call to 'merg...
[8 replies] Last: ahh no it wasn't. that fixed my problem. thanks guys! (by bombatwist)
by Okaya
Error related to scope of variables
 
Hello everyone. I am new to this forum. I have recently tried to break up one of my programs into several smaller files in order to make it more easily read...
[3 replies] Last: jsmith, Disch, thank you very much, I appreciate your feedback on my q... (by Okaya)
Program Evaluation
 
Good Afternoon everybody. I just made a Chore List program, and I would like to know if anything I did was bad practice or cluttered, etc. Basically, I'm lookin...
[4 replies] Last: Ohhh, ok. That makes perfect sense. thank you. Trust me, all the help ... (by DeadH34d)
by conqrr
hi..new here
 
hi want some advice here. i have learnt console programming in c++ we have finished array,structures, pointers,classes,inheritance and other stuff. now i w...
[5 replies] Last: i have tried QT, wxWidgets and MFC (tried only not fully learned) and... (by helios)
Basic Tree Structure Issue
 
I have programmed in Java for quite a while, yet I'm new to C++ and the concept of structures as opposed to classes. Below is this code: #include <iostream> ...
[7 replies] Last: classes are safer because they start out as private only reasons s... (by Disch)
function
 
Hi . how can I declaration a function into separate file ??? foe example just call name of function in main program
[2 replies] Last: thankssssss (by ehsangha)
struct in class
 
Hello. Can a class contains a struct? thanks :)
[3 replies] Last: Yes. (by snailshen)
UML diagrams question (1,2)
 
Hey, I'm new to uml diagrams. can any one help me? A church market has different branches. Cashiers of each branch should be able to input all sales in thei...
[23 replies] Last: My friend...first, send us some try about the exersice, how do you thi... (by alud)
April 2010 Pages: 1... 2324252627... 35
  Archived months: [mar2010] [may2010]

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