|
Learn Windows programming first, and know it well. The fundamentals of windowing, messaging, and GDI
at least.
Then MFC will make a lot more sense, and the MFC source code is the best documentation there is.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
It depends to your knowledge of programming I suggest for start with classes for controls like(CBUTTON,CTREECTRL,....).
|
|
|
|
|
dear guys,
now my problem is
I have use a lot of .h file to code , say, malloc.h stdlib.h
and then I want to use some stl to code because it has some good method, so I include the
string list, but
then I complie then all, the debugger tells me the list variable is not declare it,
and then I try to use <list.h>, and found it is different from list..
anyone can tell me how to make my code run without such error?
modified on Monday, March 31, 2008 7:26 AM
|
|
|
|
|
first wat kind of function add in your appilication ..then only we tell the ..answer easily ...otherwise how to say ..u think it
*****THANKS N ADVANCE****
Mathen.K
(I WILL TRY MY LEVEL BEST )
|
|
|
|
|
You need a good C++ book.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
wendyyue wrote: the debugger tells me the list variable is not declare it,
Which means you are watching a variable in the debug window that has gone out of scope.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
so how to solove it and make it runnable in vc?
you get my problem?
|
|
|
|
|
wendyyue wrote: you get my problem?
Apparently not. Your description is way too vague. Are you receiving a compiler, linker, or run-time error? Are you having trouble using the debugger? Does your program run, but fail to produce the correct result?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
sorry I did not clear my idea.
I mean.
originally, I use the pure c to code, but I want to use the list (from STL) to do some operation,
so I insert some code which use the list varible list<<int >> a, and then I need to include the <<list>> file and <<algorithm>> file, right? But when I complie it, the debugger tells the a is not declared , but I have include the <<list>>, so I am not sure why, it is not runnable ?
|
|
|
|
|
|
wendyyue wrote: can anyone help me?
Unlikely, given the lack of relevant information you've provided. If you want help, please explain your problem in detail and show only the code that relates to the problem. Be forewarned, posting an entire class or file is a sure-fire way to have your post flamed and/or ignored.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Well it's been a long time since I was last on here. More to the point, it's been a long time since I coded in C++. I have been consigned to the spineless world of VB6 for the last year and a half unfortunately. (Looks around for a sympathetic shoulder to cry on)
Anyway, I've got a small project on the go and there was something I just wanted to query on. Having been spoilt (and I don't mean that in a good way cos I've got sloppy) with zero-initialisation of basic types in VB6, I was wondering if there is a setting in Visual C++ 2003 compiler which forces the compiler to zero-initialise basic types? I seem to recall some compilers (like GNU ones) are able to be configured to do this. I know it's less efficient but I like being able to start using variables "clean" as it were. I know there is default initialisation defined by ANSI C++ which works like this:
int * someint = new int();
but that seems awfully awkward and looks like it'll cause headaches. Having to keep a lookout for pointer management of basic types seems like a pain. I just want to be able to configure the compiler so I can go:
int someint;
and know that after the declaration it'll be zeroed out. I know there is also memset, but it just makes the code messier.
Or perhaps I should just be a good boy and initialise everything explicitly?
|
|
|
|
|
I too was once a Basic programmer and will spend eternity ( well MAX_INT milliseconds at least ) repenting of my ways.
If you want default initialization done propoerly, you know what's coming, you'll have to do it yourself.
Here's one way.
<br />
struct Int<br />
{<br />
Int(){ i = 0; }<br />
int i;<br />
};<br />
Of course now you've done that you might as well go the whole hog and make it a fully fledged class with operators and conversion casts and stream handling, default conversion to a string for tracing and ...
whoops we've just recreated .NET System.Int32 Aaaaaaarrgh
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Yeh lol. OK, well I thought there might be a way but clearly not. Unfortunately, the project is Win32 so can't use .Net classes. Guess I'll just do it all explicitly. I've forgotten all my good C++ habits in the last two years. Thanks for the help.
|
|
|
|
|
hi...
am doing client server communication with CSocket.
shall i do communication between server and client without CSocket or using Casynchronous socket?
Is it possible?
if yes, what metheod i can use? please explain somewhat brief...
can anyone help me?
regards,
paulraj
|
|
|
|
|
The magic is all around you...[^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
hai,
have u heard about "Pipes"...using this we can create client server communication.
regards,
mani
Born to win...!
|
|
|
|
|
hi...
can you tell something briefly...
thanks in advance...
paulraj
|
|
|
|
|
|
gnanapaul wrote: shall i do communication between server and client without CSocket or using Casynchronous socket?
Is it possible?
While it is possible, it is not recommended. Read one such comment by Dr. Newcomer here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all,
I m new in proggraming, i m working on Visual C++ 2005, in my project i want to use Access database for storing data.
In my project i want store the user enterd values in database and reterived it any time.
but i dont know any thing about Access/Database and how to use database for storing data.
please any one can help me for this.
thanks in advance.
|
|
|
|
|
I don't know much about databases but when I did use it once I found caaadoclass1[^] article very useful. It will hide all the dirty details, all you have to do is create a database using access and supply a connection string to the code in the article.
-Saurabh
|
|
|
|
|
thanks for help but there is error in downloaded program.
|
|
|
|
|
Can you provide more details about the error? And also which compiler are you using.
-Saurabh
|
|
|
|