General C++ Programming - February 2009 (Page 2)

simple read and write program
 
here's my simple code.. #include <stdio.h> #include <conio.h> int main () { clrscr(); FILE * pFile; char name , address ; pFi...
[1 reply] : If you can use C++ instead of C you should read this: http://www.cplus... (by Bazzy)
c++ caling a dll
 
Hi i have a requirement where a cpp file should load a dll viz gzip.dll.then the cpp should call few methods in the dll.well im able to call the methods with no...
[7 replies] Last: But the problem is i have to decompress the compressed data returned b... (by kartheepanmirra)
by tition
Where is the memory leak?
 
Hi all, I just learned how to look for memory leaks from this forum, and found my code has one. I eliminated all code not relevant to the memory leak. The c...
[7 replies] Last: [Edit:] besides the below measures I took for a memory leak I found wh... (by tition)
Saving/loading PNG images (or any other format that supports alpha)
 
I am trying to make a DLL that generates images out of other images. The DLL has to be small, because the whole point of the DLL is to make my program smaller (...
[3 replies] Last: Isn't there some windows DLL like winAPI to save and load images (my ... (by george135)
Get a pointer to built-in 3D char array?!
 
In some cases like when some application needs to describe arguments and options it supports, there is a further need to pass a pointer to that description, but...
[5 replies] Last: Thank you for participating ... (by KarlisRepsons)
Problem with While loop
 
I have this program due soon but im having trouble adding a "Are you done? (Y/N)" loop in it... i just dont know where exactly to put it here's the program: ...
[5 replies] Last: You do need to declare the Boolean, as all names (identifiers) m... (by closed account z05DSL3A)
clear screen??
 
How do i clear the screen of the program because i want to make a text game??
[1 reply] : If you are using visual studio 2008 or 2005 and have the platform SDK ... (by Mythios)
terminal shortcuts within source code?
 
Is there a way to output shortcuts, like CTRL-U, in the source code of a C++ file? And how? (For those of you who don't know CTRL-U clears the line you are typi...
[1 reply] : It's unlikely that your terminal would interpret output as a keyboard ... (by Skorj)
Using images
 
I'm pretty new at this yet, so I'm asking if using images is something very... advanced. I would like know that because I wish start create games (very simple o...
[1 reply] : It depends on the library you're using. There are many libraries for ... (by Disch)
Can't fstream Grab the Source Code of a Binary File? C/C++
 
QUESTION: When i read a binary file from fstream, the data in file is read in Hex! If thats true, then i can read any closed source application easily. I jus...
[2 replies] Last: Disch is right, but I would like to add something. What he said is co... (by helios)
by Otto
Playing midi sequences from memory/resource
 
So I know how to open a resource to memory but don't know how to play it. So any idea how to do that? if it helps, I can use .rmi (riff midi) encryption in my...
[2 replies] Last: Ehhh... Thanks, but I'm not sure about using sdl in my project. I f... (by Otto)
interobject communication
 
hi, anybody have an idea how I can get two objects of the same class to communicate with each other. The objects are contained in a vector. Thanks, openSou...
[6 replies] Last: Make all objects being added to the vector have a pointer to the objec... (by helios)
by masiht
local,static,register,extern and global
 
I want to know what is local,static,register,extern and global ? please explain with examples.
[2 replies] Last: http://www.cplusplus.com/doc/tutorial/variables.html http://www.cpp... (by elpis)
2 . cpp files and 1 header file
 
am making this rectangle program...and my teacher would like us to make the project have 2 .cpp files and header file...i have the program sorta running with on...
[2 replies] Last: Generally the way to seperate/organize your files is to have a class o... (by Disch)
by mansu
Make a snapshot of a website
 
hi to everyone, i have a little, but nasty, trouble. I have to create a C/C++ program that must create a snapshot of a website and it must be platform indipen...
[no replies]
cout affects memory?
 
I've been building a basic matrix class (based on Capper's book) to do some other work. While testing the class and functions, I noticed that the result I get f...
[2 replies] Last: thanks for the explanation, this was really frustrating. Is there a b... (by elshrew)
Which one of these would be faster?
 
Not sure if there is any speed difference at all. I'm not looking for a correct way of doing it. Just curious which is faster or if they are the same. if(...
[9 replies] Last: Though I think something like this would fall under #0 in C++ Coding S... (by jsmith)
2 Dimension Subscript Operator Overload? (1,2)
 
Hi all, I am trying to figure out how to do a 2-dimensional subscript operator overload. I have tried searching for some information and found that it is bet...
[22 replies] Last: Thanks Bazzy for being so patient with me! You have helped me so much,... (by shaoen01)
cin.getline issue in my program
 
My program is having an issue with cin.getline in my void getnames function. It skips the line completely and doesn't let me input a name. I'm not exactly sure...
[2 replies] Last: Thanks now i know the reason. it seems to work after i put cin.ignore... (by scuba steve)
by masiht
cout.setf(ios::fixed)
 
cout.setf(ios::fixed) please tell me what is this and why do we use this ?
[3 replies] Last: Well, that would depend on what type of display you want. Usually a fl... (by Zhuge)
February 2009 Pages: 1234... 14
  Archived months: [jan2009] [mar2009]

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