General C++ Programming - June 2011 (Page 5)

Memory leak
 
I am writing a program in which one of the features is a screen capture process which then saves the captured image to a bmp file. the screen capture aspect an...
[15 replies] Last: I learned from just reading the online reference material on MSDN. ht... (by Disch)
by ramako
passing pointer THIS to copy constructor
 
Hi guys, I am trying to make use of the copy constructor using the pointer this, but it gives me a segfault. Is it possible using the this pointer to create ano...
[4 replies] Last: It does seem to be some of those, ill look more into it, thank you guy... (by ramako)
Guys please help me with C++ Filing
 
Hi, i want to save list of my data into a file. Pls tell me the best way to do it. This code only displays the name i enterd and 0 values of age and id. Once ...
[no replies]
delete element from a txt file
 
I am doing a program, where I must sort a really big file. I must use a metod that creates a lot of txt files. I want a function that is capable of deleting the...
[no replies]
Need Help with C++ Filing
 
Hi, i want to save list of my data into a file. Pls tell me the best way to do it. This code only displays the name i enterd and 0 values of age and id. Once ...
[no replies]
How to know more about IDE?
 
Hi I've been programming math algorithms for a while, but now I need to improve my skills to use graphical toolboxes (like itk and vtk) and design interfaces...
[no replies]
by GPP
change another classes varibles
 
if there two classes Dog, and Cat In the constructor of Dog I have this line of code BlackCat = new cat; now I want to change BlackCat's varible ca...
[no replies]
rewriting members of a derived class
 
Hi If we derive class CB from class CA, which already has a method function CA::method, and then redefine the method, what will happen? (assuming that the me...
[3 replies] Last: Thank you very much for your good answer and example. Now I understand... (by soheilghafurian)
C++ Divide By Zero Parser
 
Hi everyone, I am interested in writing a script/tool to parse C++ code in order to find lines when division is being used. I guess this could be accomplishe...
[4 replies] Last: You will need some regular expression engine. If you can't use boost r... (by Silvermaul)
by clarkk
pseudo-random number generator problem
 
Hi guys im trying to make my own pseudo-random number generator from the algorithm below using the kent chaotic map. { x(n)/m, 0 < x...
[2 replies] Last: it works now, thanks alot! (by clarkk)
STL & io
 
please help me how can i store data of a list to binary file?! for exmple : void main() { list<int> l; ofstream fout("a", ios::out | ios::binary ); ...
[8 replies] Last: no body know how can STORE object of a list to file and READ them ... (by ahura24)
Strange bool output
 
Hi Guys, I'm going nuts trying to figure this out, any help much appreciated. I have the following comparison, all data types are double: cout<<(d->getLow...
[5 replies] Last: LB, it seems even though I was reading from the same file floating poi... (by suthers)
How to specify inputs using scanf in a particular format
 
Hi, I want to make a program that accepts the radius of a circle and co-ordinates of the center. I want the user to specify the inputs as: radius:{(x,y)} ...
[2 replies] Last: if( 3 == scanf( "%d:{(%d,%d)}", &radius, &x, &y ) ) (by bruceteen)
how to get the nearest char in a string
 
a question. how to get the nearest char in string , eg. there is a string is : "abcdefdegfgh", then we should get the 'g' , because the it's distance is 2,...
[2 replies] Last: h9uest , thank you very much , I got , I will review hash table firs... (by misserwell)
Trouble with function args.
 
I'm making a simple program to multiply polynomials as an exercise to help myself understand classes and such. I have narrowed down my problem and what I don't...
[5 replies] Last: Thanks CreativeMFS, that turned out to be the problem. Must have left... (by anotherghost)
Manual ASCII Checker?
 
Hey guys, I have sort of a simple sounding thing I would like for some help to accomplish on C++. I'm using Dev-C++ and I wanted to make a system that cycles th...
[1 reply] : If you looped between i=97 and i<123 you could print all the lower cas... (by buffbill)
Determine Size of a va_list
 
I am trying to make a function that accepts a variable amount of character sequences without having to specify how many arguments are being passed when I call t...
[1 reply] : The only way is to do just that - somehow specify the size as one of t... (by LB)
Problem with STL
 
Hello everbody! I just have a problem with the vector class. In the following code line 16 causes the compiler error: c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\...
[5 replies] Last: ostream objects (ofstream is derived from ostream) are noncopyable. T... (by jsmith)
by nand
can an array be declared by a non-constant value?
 
Hello, There is much documentation on the internet about always declaring arrays by constant values, eg. int array ; because NOTE: The elements field with...
[10 replies] Last: vector will work but the code that i have pasted earlier is working (... (by firedraco)
I Want Your Suggestions
 
I'm creating a small class that's similar to a vector, but it's length doesn't dynamically change( a fixed-length array basically ). I want some of your feature...
[18 replies] Last: [quote=Athar]requiring no allocation and deallocation Every object al... (by closed account zb0S216C)
June 2011 Pages: 1... 34567... 28
  Archived months: [may2011] [jul2011]

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