General C++ Programming - April 2012 (Page 35)

string BST
 
class StringTree{ private: class TreeNode{ friend class StringTree; string str; TreeNode *left; TreeNode *right; TreeNode(string s, TreeNode *...
[7 replies] Last: Wow. I forgot #include<string>... (by tjcrandall)
Why am I getting linker errors?
 
So I have 6 linker errors which tell me some of my functions which are referenced in my .cpp file dont exist. These functions are in my .h file which I have inc...
[4 replies] Last: You didn't define functionE in the class; you declared it there. You ... (by Telion)
by nick92
biggest value?
 
hi this is my first post i need help for this problem..:( #include <iostream> using namespace std; int main() { int x=0; int y=0; int num; ...
[3 replies] Last: For starters, any time the condition, x > y, is true the count will be... (by moorecm)
If Then Else Nested: Largest Integer
 
Hello everyone! this is my first post on here. Currently I am working on a project for my introduction to computer science course and I have run into a few prob...
[3 replies] Last: At least remove the semicolon in the statement if(value1>value3) ; ... (by vlad from moscow)
Overloading default Constructors
 
I know you can overload certain constructors when working with classes, such as the default constructor, the destructor, and even the + and = operator construct...
[1 reply] : When you create a pointer, you don't create the thing for it to point ... (by Moschops)
by capito
Classes in Sub-Objects
 
Was hoping to get feedback on the following scenario - "for the class declarations below, how many sub-objects of type Base1 are there?" ----------- ...
[2 replies] Last: OK - that's consistent with what I thought. Although, you could say te... (by capito)
Switch statement in file input/output
 
Solved
[1 reply] : When you do the first case first, you reach the end of the file and th... (by clanmjc)
Regarding infinite loop with cin and while
 
Hey there experts and gurus. I wanted to ask about the code i have used below here. I wanted to only allow 1 to 12 numbers,since it only has month 1 until 12 ...
[2 replies] Last: Instead of casting your input directly as an integer, you may want to ... (by astex)
by astex
boost::function doesn't like templates
 
I have a function template that takes a boost::function as an argument. In simpler terms (without use of boost): template <class T> T g(T (*f)(T), T a, T b,...
[6 replies] Last: Template code is not "real code" in that sense. At one time people th... (by Cubbi)
by capito
C++ Pointers question
 
Brushing up on my C++ by working through some C+++ test questions. Could someone elaborate on the differences in behaviour of the following pointer declaratio...
[10 replies] Last: Thanks. (by capito)
class object pointer access methods?
 
I am writing code and I am using a pointer to point to an object of a class I created. I want to have this pointer run a method, but I am getting an error of: ...
[3 replies] Last: Thanks, that worked. (by DeadEli)
by siloan
Declaring with new & delete
 
Hi there, all things declared with new must be deleted? For example in a function i have a char declared with new, after function ends things declared in it are...
[7 replies] Last: Yup. New byte(10) almost got me, until I realized curved brackets :S ... (by BlackSheep)
question about reading files
 
how can i take numbers and characters from a file and put it into a variabel (in this case into an array). i already know the basics of output to files (using ...
[3 replies] Last: Yes, except cmd window is limited to how many lines it can display, wh... (by Ortonas)
by Mannah
Composition classes
 
this is the header file #ifndef person_h #define person_h #include <iostream> #include "address.h" using namespace std; class Person { public: P...
[2 replies] Last: Thnkkss =$ (by Mannah)
by snig
mobile wifi router app.
 
hello im fairly new to c++ but i am learning pretty quickly so i was wondering how hard would it be to make an app for a mobile device with c++ what could take ...
[2 replies] Last: yeah ok i will take a look. thanks (by snig)
by roarkr
Reading txt file with ifstream goes wrong
 
Hi, I have the following code that reads an ip address ( i.e. 192.168.0.199) from a txt file. The txt file has only 1 line and that is the ip address. The ...
[4 replies] Last: Don't forget to replace while(!stream1.eof()) { stream1 >> ... (by Cubbi)
Error in the following code
 
Dear Friends, I am getting the following error when I integrate this piece of code into my program , but when I execute this independently It is ex...
[8 replies] Last: Thank you , Yes you are correct , it is declare in " iwlib.h" header f... (by BABU Prasad G)
Ufff.... Getting Wrong Answer !!!
 
Here's the question :- The government of Siruseri has just commissioned one of the longest and most modern railway routes in the world. This route runs the en...
[15 replies] Last: Oh ! :D (by Maggi Iggam)
by Yousra
The Problem: The Towers of Hanoi
 
Hey, I am working on my assignment and I tried to run the program and I get build in errors, So first this is my problem : In the Towers of Hanoi game, there...
[7 replies] Last: You're welcome :-) Please mark the article as solved. (by TheDestroyer)
some qt questions
 
i have decided to learn qt since i need to lear gui programming. (i would prefer something more like sdl, where you still just write code and dont do any stupid...
[no replies]
April 2012 Pages: 1... 3334353637... 49
  Archived months: [mar2012] [may2012]

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