I read a book, it taught me programming in dos. How do i move it up to windows?
Printable View
I read a book, it taught me programming in dos. How do i move it up to windows?
Programming Windows by Charles Petzold. Simply the best book on Windows programming I have read.
Or if you don't want to read a book with 1500 pages, then look at the winprog tutorial: www.winprog.org
theres an example in the faq :)
Charles petzold is the best book on Visual C++, i guess.
Other good c++ concept book is, c++ inside out by bruce eckel.
winprog.com is great, but i wanted c++, some of the stuff they use my compiler doesnt understand
winprog.org uses C I think, some of which won't compile as C++ (the type checking has been tightened).Quote:
Originally posted by Mushroom Realm
winprog.com is great, but i wanted c++, some of the stuff they use my compiler doesnt understand
But pure windows programming is in C like the SDK. You can use C++ yourself but you won't learn more about windows this way.
Hint: to make your compiler compile C examples put it into a .c file, not .cpp
This will make the compiler compile it as C.
i dont mind not learning more about windows, im already stressed abot school then throw in vb, and c++, im learning enough, i dont want to add the more complicated and less usefull c to the mix
What I mean is: you get no advantage in understanding windows from using C++ in favor of C. You'll get it later.
You don't need to learn C. The incompatibilities are minor syntactical issues, so you can simply copy and paste the examples to a .c file to compile them and see what they do and then recreate them with C++ to modify them and learn.
How do u call api in C++, ive been trying to use the ShowCursor api like this:
#include <windows.h>
#include <iostream.h>
int WinMain()
int command;
{
cout>>"Terminal Activated\n";
while(command!="end")
cin<<command;
if(command=="cursor")
ShowCursor("False");
if(command=="show")
ShowCursor("True");
loop
}
Im using a cheap, free compiler from borland, and it gives me 2 errors. One is a declaration syntax error, and the other is declaration terminated incorectly. What am i doing wrong?
just try
ShowCursor(false);
all lowercase no quotes needed
:)
Still gives me the same error
Is there any really good easily atainable books/sites that will teach me c++, I know a little, too much to the point where i dont want to spend $50 on a book thats beginner to advanced, and too little to understand winprog. Its just going right over my head.
cin uses >> and cout uses << you've got them backwards :)
LOL im new to c++ ive been doing it for 3 weeks, and ive done this atleast once a day.
hold up, its still not working.
int WinMain()
int command;
{
cout>>"Terminal Activated\n";
You have the
int command;
line before the start of the function body.
Don't use <iostream.h>, use <iostream> and
using namespace std;
This is the modern standard, the other is deprecated. If it doesn't work, download the newest free compiler from borland, I'm sure it supports the new STL.
Pass TRUE or FALSE to windows functions requiring a BOOL. Don't use quotes, and put it all in capitals.
If a bool is required somewhere, pass true or false (all lowercase).
My internet is slower than the speed that u would think possible. It takes me atleast a full 20 min to download a mb of data, and thats when its not busy. What would the advantages of using the none .h version be?
It's standard, and they're all templated so they fit in more neatly with the rest of the Standard Library.Quote:
Originally posted by Mushroom Realm
My internet is slower than the speed that u would think possible. It takes me atleast a full 20 min to download a mb of data, and thats when its not busy. What would the advantages of using the none .h version be?