|
CFindFile will be useful
- NS -
|
|
|
|
|
shakumar_22 wrote: Give your suggestion to Reading and Writing the data from Folder.
There are a lot of ways, including STL streams, MFC classes such as CFile and CStdioFile , and the Win32 functions like Read() and Write() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
I have code that will help
if you whont I will send you code
and comment.
|
|
|
|
|
Hello Friends,
Currently in free time i was just checking the C#.Net. and when I try to make the sample porject in C# in Visual Studio 2005 I amazed by the IntelliSense.It works so fast and nicely in C# but it doesnt working in the same manner when I am working on Win32 programming. Is there any way i can change the IntelliSense to work better.
|
|
|
|
|
Hi,
i think no. But you can set some preferences into the Settings-Menu of VS2005.
Propably some checkboxes de-/activates some specials which takes more time
Greetings
|
|
|
|
|
Hello,
I need the answers for the following questions:
1. I have a class (ex: Test) contains 2 variables,then I am creating 2 objects of that class. How many copies of the variables are stored in memory?
2. What will be the output of the following program:
int* fun()
{
int a;
return &a;
}
suppose, if i assign a value for the variable "a" (ie int a=10) what will be the output?
Thanks in advance for the solutions.
|
|
|
|
|
1) two: one copy for each object. Do you want one common object for every class? Then you have to use a static variable.
2) it returns the address of the variable 'a'...it is not important what it contains (10 , 20 or 0). You can look at the contents of (&a) with *( &a )
Russell
|
|
|
|
|
Suspiciously homeworky
I reckon you can multiply 1 by 2 so on to the second part. The a varaible is a local varibale in the function you have written. This along with the way it's declared mean that it ends up on the stack. If you think what happens to the stack for this function when execution leaves the function then you'll understand what returning &a will give you. If the stack means nothing to you then you've discovered the point of the exercise. If you're into full on low level code and just not familiar with C++ then I'd recommend debugging through the example you posted in the disassembly window.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
rajaratk wrote: int* fun()
{
int a;
return &a;
}
bad function: you can't use the address of a local variable, 'a' is destroyed when the function ends, so *fun() can return a number different from 10 (in your example)
Russell
|
|
|
|
|
Russell` wrote: you can't use the address of a local variable,
You can, but the value gained us useless, thats the pitty!
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
So, finally, it is the same of "you can't use it".
Do you agree?
Russell
|
|
|
|
|
Yeah, your right.
My brain-internal search&replace put 'get' in place of the 'use' you had written!
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
jhwurmbach wrote: My brain-internal search&replace put 'get' in place of the 'use' you had written!
Damned multithreading...
Russell
|
|
|
|
|
Thanks a lot for your answers.
For Q1, I have one member function like fun(), if i am creating 2 objects and calling the function, how many copies are stored in the memory:
Test t1, t2;
t1.fun();
t2.fun();
|
|
|
|
|
Why don't you suggest an answer, and from there we will be glad to help you; because now it seems we are doing all the hard work.
|
|
|
|
|
Hi,
I have to plot a graph using MFC for one of my projects.Is there any example or tutorial which explains how to do that.
Regards,
Mayank
|
|
|
|
|
The Scribble example from MSDN is possibly your best starting point. It already contains all the framework and most of the drawing code you need along with mouse interaction which you won't want at least to start with. It should be straight forwrd to adapt it to read a file of axis and point data and generate a graph. 3 hours tops
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
I developped a charting control some time ago. Check my sig for the link. There are some other similar controls in the same category also.
|
|
|
|
|
Hi,
I have VC 6 in my machine. I need to install the VC 2005. I have to use VC 6 for creating the release of projects. So if I install the VC 2005, will it affect the VC 6? Also will it affect the release product?
Thanks in advance.
- NS -
|
|
|
|
|
I have VC6 and VC2005 installed on my machine and I don't have any problems.
|
|
|
|
|
Thank you for the information. Since I have to do it in my office computer, I am a little bit confused about that. Someone told me that it would affect the building of projects and the release will not be reliable. He said that the dlls and/or lib of the VC 6 might be replaced by that of the VC 2005.
- NS -
|
|
|
|
|
NS17 wrote: Someone told me that it would affect the building of projects and the release will not be reliable.
|
|
|
|
|
Not you. I am sure....
- NS -
|
|
|
|
|
I have installed VC6, VC 2003 and VC 2005 on one machine. It is working fine since then.
For ease of use you better dont change the default installation settings as directories.
Greetings from Germany
|
|
|
|
|
I installed vc6 at first, then I installed vs2005, at last, I uninstalled vs2005. But the file associations with vc6 are lost (.dsw/.dsp/.c/.cpp etc.) . I don't know the principle of file association by now. Who can help me to find them. Thanks very much.
|
|
|
|