General C++ Programming - May 2009 (Page 14)

Static variable in header file
 
I have program like this //header.hh #include <iostream> using std::ios; using std::endl; class A : public B { public: static bool abool; ...
[4 replies] Last: see if you have a static variable in a class lets say //some.h c... (by writetonsharma)
can a refered dll have main()
 
i have a idea that write a dll which have main(); but it is refered dll, which means it called by a exe. why i think have this idea -->because if it can ha...
[8 replies] Last: Both a DLL and an EXE are a PE32 file, which is basically an organized... (by Duthomhas)
Hard Code Password Question/Passing a Parameter to Console
 
Hello, Let me first apploigize as I am sure this question sounds like it is all over the place. I am trying to write a c++ program that will install software ...
[1 reply] : Belongs in the Windows forum, but anyway. Three choices: 1. Tell you... (by helios)
reference as parameter
 
When a function has, for a parameter, a reference as in myFunction(const string& str) does the caller normally pass a pointer i.e. const string* strptr...
[13 replies] Last: Even if it doesn't seem so, when you need to tell whether a parameter... (by PanGalactic)
bind gives error C2065: '_1' : undeclared identifier
 
Trying to make one of the programs in "Efficient C++" work: #include<iostream> #include<functional> class GameCharacter; // forward declaration int...
[2 replies] Last: The second line helped. -Thanks. (by strawberry)
C++ File Handling issue.
 
Hi Everyone I have a test.tag file on disk. A small portion of the file is as follows: <acc code = "SAVINGS" odate = "20090101"> <tag>Account Code</tag><...
[2 replies] Last: You want to use an istringstream . It is quite common to do this i... (by PanGalactic)
by kk84
how to convert an array of characters to integer
 
I use ifstream to read a set of input from a file which consist of only numbers. I store these numbers in an char array. I need to use this numbers to do calcu...
[4 replies] Last: The Boost Conversion Library (http://www.boost.org/doc/libs/1_38_0/lib... (by PanGalactic)
Ex function name
 
A couple times now I've seen people mention a function such as Render() and then below that have RenderEx(). I'm sure some of you have too and I can't seem to g...
[2 replies] Last: Cool...I've always wondered what it was. And I see tons of Ex function... (by closed account S6k9GNh0)
hey friends
 
what is the meaning of void as a parameter?? void add(void){}
[6 replies] Last: I guess what I meant to say is that it's a C requirement and not a C... (by Disch)
Compile error with nested loops & iterators
 
Hi all, I have a problem here, with a type like set<vector<int> > and iterators running through both levels: #include <iostream> #include <set> #include...
[4 replies] Last: set<>::iterator is the same as set<>::const_iterator. The container c... (by jsmith)
by jfq722
are copy ctors of STL classes deep?
 
if I have a collection containing 3 Accounts: vector<Account*> m3_accounts; and assign it to another collection: vector<Account*> m5_accounts; like this...
[4 replies] Last: Trust me, the std::vector *is* intelligent but not clairvoyant. Vecto... (by kempofighter)
Hierarchy design
 
Hi guys, I have to build a GRbTree class ( that is, a red_black binary tree with a graphical interface, maybe with Gtkmm ). At this moment I have already done...
[6 replies] Last: I know, saying SimpleTree is kinda ambiguous, here it is how SimpleTre... (by denis90)
i am new to visual c++ complier
 
i am new to visual c++ complier ,i want to know all the dos and donts for this compiler. earlier i was working with turbo c++.
[1 reply] : Do: Use it to compile C/++. Don't: Use it to compile Pascal. W... (by helios)
ZED
 
"...always pad unused vector elements with constant ZED" in an assignment instruction. Is there some nifty global constant called ZED, or does this probably ...
[1 reply] : it probably means that you have to create it yourself. 0,-1, numeric_l... (by csiz)
tic tac toe for my 5 yr old granddaughters
 
I need to write a tic tac toe game. What I would like it do is 1) keep track of the number of games won by the 2 players and the tie games. 2) each time a...
[no replies]
Using batch codes
 
So I am looking for a simple way to make a c++ program, but using batch code as well. Simply put, I'm off school for the summer, and I am trying to keep myself ...
[3 replies] Last: The Windows Platform API has a CopyFile function. Directories are tra... (by kbw)
invalid lvalue in assignment error
 
Hi, I am getting invalid lvalue in assignment on the following line of code: A ->getWater() += water; Water is of type float. I am trying to update the...
[3 replies] Last: Maybe you mean something like a ->setWater( a ->getWater() + water );... (by Hammurabi)
about three layered c++ program
 
i am trying to make a simple 3 layered c++ program consist of header.h, main.cpp & imp.cpp in header.h: #include <iostream> using namespace std; class ...
[3 replies] Last: No, these aren't layers. There are three files, two compiled modules,... (by kbw)
by dkaip
real random ...
 
Hi all. I am using the random function, but the resaults are no good. It gives 111111111111111 or 2222222222222222 etc... There is a real random generator? ...
[4 replies] Last: When looking in net, the trully real number, generation is not easy. F... (by dkaip)
memory alocated problem
 
I have a problem about memory allocated, I read through my code and think threre is no problem, but it did happens, it very confusing me ...., here is my code: ...
[8 replies] Last: I'm wrong again! There's nothing wrong with dUnit& tmp = getGridUnit(... (by kbw)
May 2009 Pages: 1... 121314151617
  Archived months: [apr2009] [jun2009]

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