General C++ Programming - January 2011 (Page 2)

Assigning Class Reference
 
Hi I am having reference variable in a class to avoid the costly copy operation. I am trying to assign this in costructor. But the compiler is complaining...
[2 replies] Last: @firedraco: Thanks I got it.. (by vrbilgi10)
heap error
 
i get this error at the beginining of run the project "Windows has triggered a breakpoint in diplomatiki_me_arrays.exe. This may be due to a corruption of t...
[3 replies] Last: Why is Data public? Any part of the program can corrupt it without de... (by kbw)
by jo45ng
Errors on opengl code with c++
 
Hi everyone, I urgently need help on this opengl code I compiled with c++. It gives errors: Error E2040 opengl_simple.cpp 1: Declaration terminated incorre...
[3 replies] Last: This line glVertex2f(0.5, -0.5) is missing a terminating semi-... (by Moschops)
container class problems
 
I've been trying to make a dynamic array template class recently and i've run into some problems on witch i have no idea how to fix so here is the code... #...
[2 replies] Last: Should line 66 read "backup = new c_type ;"? no but you saying t... (by okimdone2)
1 1 1 1
 
In our Computer Education subject, we are asked to write a program that will input an integer and will produce "*" half-triangle and whole triangle form; number...
[2 replies] Last: search the beginners forum for a diamond shape ex, you can easily modi... (by Crutoy)
cppUnit
 
my error here #include "file1.h" CPPUNIT_TEST_SUITE_REGISTRATION (FileTest); void FileTest::setUp() { } void FileTest::tearDown() { } ...
[5 replies] Last: void CppUnitTestClass::testValidatePassword() { string p0 = "Pass... (by nanochan1)
ID not member of Parent class
 
I have created a new class derived from TPanel: class PACKAGE TTerminal : public TPanel { private: protected: public: __fastcall TTerminal(TCompon...
[3 replies] Last: By the way, this is C++. It isn't. It must be some kind of compi... (by Disch)
SFML On VC++ 2010 Express?
 
Does anyone have any good tutorials on how to set SFML on VC++ 2010?
[1 reply] : It's fairly easy. First you need to re-compile the projects. Find the ... (by naraku9333)
by djmkr
Beeper program
 
Hello again, I have been asked to develop a BEEPER code program into the following code. Everything is fine but I keep getting this error code:- 1>main.ob...
[2 replies] Last: What does line 31 do? (by PanGalactic)
by Aesin
vector class imitation
 
I am trying to imitate the vector class with arrays the constructor is IntVector:: IntVector(unsigned size, int value) { vsize=size; vcapacity=s...
[2 replies] Last: Make sure that you are accessing a valid index. Add this in your at( ... (by closed account zb0S216C)
call to a constructor with a the same name of a local variable
 
In the following code class f { public: int *a; f(int g) { a = (int *) malloc (sizeof(int)); *a = g; } }; class h : public f { int f; ...
[8 replies] Last: anyway, thank you for your help :) (by gabsnake)
by Arne
Preprocessor Macros
 
Hi i wanted to write some advanced Preprocessor Macros. Therefor i tryed to define a macro inside of an other macro #define CREATE_FUNC(FUNCNAME) #define F...
[7 replies] Last: this could be a solution, but with a lot of work^^ (by Arne)
C Programming: How to Display Output from Numbers to Words?
 
Hello guys! I'm new in C programming and i want to know how to display out in words if number is inputed, using switch or an if..else statement. I have a little...
[8 replies] Last: Hello Guys Thank you for the codes specially ne55... ^_^ I want to sh... (by mixmagz)
pyhton... (1,2)
 
i need some sample programs of python.. just simple program!! ex: ask user to input any variables... i dont have any background of this language... pls he...
[21 replies] Last: Sample program for SQL import MySQLdb import MySQLdb.cursor... (by mixmagz)
get rid of exponential form
 
i am getting a double value as this 3.46969e+06. how to make it to a normal form as 3469692.6031362 i can print it in correct form using cout.precision(15) ...
[3 replies] Last: d holds the correct value 3469692.603136. That is show by the printing... (by wolfgang)
NTVDM CPU has encountered an unhandled exception
 
I made a c++ program but my teacher rejected it because i had used goto function everywhere. she told me that i can use do while instead. so i started replacing...
[3 replies] Last: Indent your code. Change your headers, you are using deprecated ones ... (by ne555)
by djmkr
Creating an element function!
 
Hello all, I am facing a problem while trying to write a code for a program which is supposed to return a reference of the (i-th) element from an array of type ...
[3 replies] Last: Nevermind. Line 23 threw me for a loop. (by PanGalactic)
'__in_chrg' parameter in destructor
 
Hi, I saw couple of parameters in destructor's. Of course one was 'this' pointer, and other is '__in_chrg'. Can any one please let me know why this is used (...
[4 replies] Last: __in_chrg would appear to be an internal parameter used by the compile... (by PanGalactic)
Am I pursuing a Bad Idea With Char's?
 
I'm creating a small library that contains 3D/2D vectors and such for any future gaming projects. I though to myself, "Should I use the X, Y and Z characters to...
[2 replies] Last: I suppose I could do that. This is an example code, not the actual cod... (by closed account zb0S216C)
Release version doesn't output
 
I'm making a program to test how often an IP changes, as I can't get a definitive answer online. It starts by opening iplog.txt, connecting to whatismyip.org, r...
[6 replies] Last: The release version usually isn't just the same as debug, minus the de... (by Moschops)
January 2011 Pages: 1234... 24
  Archived months: [dec2010] [feb2011]

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