General C++ Programming - December 2009 (Page 11)

mysql C API connection question
 
Hi here. I have a question about connecting to mysql server through C API. Does the client program have to initial a single instance of struct MYSQL for e...
[2 replies] Last: Hi melkiy, Thanks, If I read manual careful enough, I should find a... (by liangxiao)
no matching function...
 
When I try to compile this program, among other error messages, I get one that says "no matching function for call to 'Matrix::Matrix()'" and I don't know why. ...
[5 replies] Last: The A would be a good use if A was an unidimensional array. Consideri... (by Ashden)
extracting emails from txt file
 
Im trying to figure out how to filter out emails from a form. Its working to a degree in that if the email address is staggered from a name it works and pulls...
[1 reply] : This is because you are extracting email on the basis of @,this one is... (by mogha)
Struct error
 
The database that i need to use is in chronological order by presidents names.The chronum is what number president the particular individual was.The pointer(nex...
[10 replies] Last: What type did you declare temp as? And what type is plist? (by PanGalactic)
Overloading the output operator << as a friend
 
Ok, so I've searched, I've googled, I've tried a lot of different things but nothing ends up working for me. My assignment states that I am to overload the outp...
[3 replies] Last: Huh. See the second post: http://bytes.com/topic/c/answers/63289-templ... (by helios)
Decimal in C++
 
Hello, I will write a financial program in C++, but I don't know how to deal with decimal numbers. I know that if I work with floating-point types I will hav...
[3 replies] Last: Well, 9999999999.00001 is well inside the 64-bit limit, but if what yo... (by helios)
by JRevor
Return not returning!!
 
Here is the code segment which doesn't work template<class RECORD> TPointer FileBuf<RECORD>::Read(RECORD& r, const TPointer pos) { if (fs.is_open()){ ...
[6 replies] Last: Thanks helios. Yeah, it seems the problem is related to that. When i ... (by JRevor)
output problem
 
Im writing a program to print binary/bninary search trees. I can get the binary trees to print,but not the binary search trees.im going to try to give the most ...
[4 replies] Last: ok, i have a more specific question that does not involve alot of code... (by kakashi316)
A question on inheritance
 
Suppose I have a number of similar classes that contain some variables and some functions in common, call the classes B,C and D, and supposed they are all deriv...
[3 replies] Last: Thanks guys for the speedy response! I hadn't thought of doing it tha... (by koenigs)
Copying void * data
 
I have a function int CHAN_SEND(CHANNEL_t Channel, void *stuff, int size) And I want a copy of what stuff points too. size is the size of the data. so ...
[2 replies] Last: Thanks so much!! I new there was probably a c function for this. (by DRJTower)
Downcasting with private inheritance
 
Can anybody tell me what is the prob here? #include <iostream> using namespace std; class Animal { public: virtual void speak() { cout << "Anim...
[3 replies] Last: You want polymorphism, private inheritance has different purposes: ht... (by Bazzy)
by NGen
Handling the Mouse
 
Is there a mouse-equivalent of the functions GetKeyboardState or GetAsyncKeyState? I'd rather not have to go through window procedures just to see what's going ...
[5 replies] Last: Solved in http://www.cplusplus.com/forum/windows/16988/ (by kbw)
std::map does not compile when value type is template
 
Hello This code: template <typename MyT> inline void myFunc(MyT value) { std::map<int, MyT>::iterator myIter; } gives this error: error: ex...
[4 replies] Last: I've tryied in visual studio and it compiles indeed, but I need it for... (by Asteroth)
Edit programs for money
 
I will have $5 paypaled for each program that is modded. Here is one of them. Shouldn't be hard at all for you programmers: #include <cstdlib> #include ...
[1 reply] : I'll do it for USD 300. (by helios)
Vector Of Structs Problem
 
Hello, I'm having problems passing a vector of structs to a function. What I'm trying to do is create a program that implements of a vector of structs which hol...
[7 replies] Last: If the argument passed is an empty vector, it won't work (by Bazzy)
Making a program "skip" to another part.
 
I'm making a game and i was thinking about what happens when someone dies and i want to make it so they go back to a certain point like the last shop or w/e. ...
[14 replies] Last: So is it that depending on user input you want to go back to some part... (by manojr)
Networking in C++
 
Hey all, I'm ready to start looking into networking - in the middle of making a multiplayer game haha can anyone point me in the right direction? I've seen ...
[2 replies] Last: Awesome :) Thanks for that! Any good tutorials for the Boost library? (by NickPaul)
Out of range
 
x = k*s; while (x > n) { x = floor(( k*(x-n) - 1.0 )/ (k-1.0) ); count++; } In the above code n, k, s integers <...
[4 replies] Last: Problem Solved. Though x was unsigned long since k and s were integ... (by rachitagrawal)
by Una
2D dynamic array of pointers
 
Hello, Could anyone pls explain to me how to create a dynamic two dimensional array of pointers. I searched the google, but I did not find anything useful th...
[7 replies] Last: operator = needs to be overloaded for cluster_node. (by manojr)
base class undefined, class type redefinition and lots more
 
I am practising inheritance for my computer science class but I'm getting a lot of errors and I have a feeling it's one of those errors where just one small cha...
[5 replies] Last: Are you sure you put header guards in place, in addition to stripping ... (by JivanAmara)
December 2009 Pages: 1... 910111213... 16
  Archived months: [nov2009] [jan2010]

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