General C++ Programming - February 2010 (Page 14)

Linking error when include C in C++
 
Hi everyone, Somebody can help me. How do I compile this files? // c.h #ifndef WOW_H #define WOW_H int x; int h(); #endif //c.c #include...
[2 replies] Last: You can't define globals this way. A global can only exist in one sou... (by Disch)
Convert text file to binary
 
How do I convert a text file to binary?Then store the conversion in a binary file.
[2 replies] Last: I think this reference could help. :) http://www.cplusplus.com/do... (by nosxlimit)
main.cpp:40: warning: taking address of temporary
 
I received this error while checking for collisions between my car and all the enemy cars: SDL_Rect* playerRect = &player.retrnRect(); retrnRect() retur...
[3 replies] Last: Okay, got it. (by DrChill)
Problem with Query statement
 
Hey guys I want to insert values into a MySql database. The following line works fine: mysql_query(connection, "INSERT INTO main (NumofShows , Title) V...
[4 replies] Last: I am not very clear about it. Could you show me how is it done on my e... (by gregarion)
Looking for way to read Int/Doubles from text file 1 line at a time.
 
Hey there all. I'm supposed to write a program that reads ints from a .txt file with multiple lines, and organize them line by line. I made a mistake in read...
[1 reply] : try getline with stringstreams: string my_string; getline(infile, m... (by hamsterman)
Segmentation Fault Error
 
I'm working on a merge sort program, and am getting a force close alongside a segmentation fault error. (I'm working in Dev-C++ by Bloodshed). I know these are ...
[1 reply] : is r greater than p? Also are you sure K is not exceeding the lengt... (by iharrold)
by excel
Multiple file compilation Borland 5.5 compiler
 
Hello, I am a newer to Borland Compiler. I have a project which has around 100 cpp and header files. Can anyone tell me is there anything like Makefile in ...
[2 replies] Last: Anyone else who can help me on Borland... (by excel)
question about sizeof
 
hi, i have question about sizeof, when it used with pointers and arrays. int a = {0,1,2}; size_t = sizeof(a); here i will get the size of array a in bytes...
[3 replies] Last: helios , thanks alot. kbw , i know it, the question was not about t... (by akmal4ik)
Sql Connection problem
 
Hey guys, i am trying to connect mySQL to a program in c++. I tried out a tutorial i found and here are my codings.. #include <stdio.h> #includ...
[8 replies] Last: Problem solved. thanks alot! (by gregarion)
wireless router design with c++ , HOW?
 
hey guys i need to design a router which prepare internet for other computers . i mean my computer would be the gateway somehow and other computers could conne...
[1 reply] : Maybe it will be useful http://www.hot-shareware.com/software-develop... (by Denis)
polymorphism
 
What's wrong with this? when I compile it, it says missing ; before : CShape::checkMovement():lBlock ,lBlock ; What I want is to inherit the x,y value...
[8 replies] Last: yeah it is a tetris game.... Oops... I forgot to call the object... (by olredixsis)
Something wrong in the code
 
void File::Write(const char* buf,const char* pErrorParameter1,const char* pErrorParameter2,const char* pErrorParameter3) ///some operation char* pCha...
[4 replies] Last: hi jsmith, thanks that solves the problem. instead of creating th... (by somshekhar)
WinBGI 'floodfill' function
 
How would i use the flood_fill function in the WinBGI graphics.h library?
[1 reply] : Pleas help me I'm really confused about this. (by coolProgramer5)
Combining Case functions....
 
i have a app that writes to an xml file using command line switches, what i would like to do is have several of the cases combine into one so i can use switch -...
[8 replies] Last: So these are 1 digit arguments? Why are you using strings, then... wo... (by Disch)
bitset AND operator question
 
Copied this from the reference page bitset<4> first (string("1001")); bitset<4> second (string("0011")); cout << (first^=second) << endl; // ...
[2 replies] Last: also how come 1001 bitwise OR 0011 turn out to be 0011? It's not.... (by Disch)
Deadly error in vector code
 
"This application has requested the run-time terminate in an unusual way." I am freelance trying to run through Stroustrups principles and practice in c++ pr...
[18 replies] Last: Yes that helped , I eventually came back to this problem on my own and... (by Infomania)
Problem with output
 
Hey guys, i am having problem with displaying my text. my text file is displayed in such a way and is called test....... Sam Worthington ... Jake SullyasZoe...
[1 reply] : char str = line ; This line makes no sense, char arrays are not... (by firedraco)
map + copy constructor
 
Hi Guys, In the code below, why is copy constructor called three times? class base { public: base& operator=(const base&) { ...
[3 replies] Last: Thanks for the explanation guys ! (by kevinchkin)
by bordob
getline problems
 
I'm using NetBeans 6.8 I'm trying to create a program for a class but on line 32, the getline(cin,title) statement does not work. When I placed it on a higher ...
[5 replies] Last: I fixed the problem. The newline character in the previous statement ... (by bordob)
Keeping output from multiplying in loops
 
Hi everyone, I have a simple problem but it seems complicated. I need to keep text from duplicating in each iteration so during, say, a while loop a text, s...
[8 replies] Last: int counter = 5; std::cout << "Processing..."; //NB: Th... (by miklatov)
February 2010 Pages: 1... 1213141516... 21
  Archived months: [jan2010] [mar2010]

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