Windows put out the win32API that is a simple MFC. Windows programs are slow by design, Gates has built an OS API ... his.
C++ can be very fast, the right compiler, and less trash code you write. C is the first, C++ started as a pre-compiler type tool back in the mid 1970's. Now C++, it is a full language that in maybe another 5 years, will leave its C past out in the cold.
i did not login:
j@ck_
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
<Using the API commands instead of pure C/C++ code will slow down my program?>
You're asking about adding a muffler or foglights or new tires to make the car go faster.. if your tires were shredded to begin with, new tires might help it go smoother and a little faster..
If you want fast code you should use win32asm.. which uses the win32api as well, but still your app has to contend with other apps and resource hogs running on your system, so your question is kinda irrelevant. It depends on what the program is intended for. If you want it to go really fast, write it using opengl or directx fullscreen and disable all background processes so your machine is tied up by your one program >)~ how to do that i gots no idea
There isn't much of a difference when using straight C(fprintf) or C++, not enough clock cycles to notice a difference. The main thing is how much overhead you don't mind putting up with.
- drarem
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think in many cases, using WIN32 API is faster and efficient than using C/C++ code (or run-time routines).
For example, fopen opens a file. Do you know what it does on its way to the file? It evertually calls the appropriate OS routine! On Windows platform, it calls CreateFile!
So bear in mind, C/C++ is a programming language, it has to use the infrastructure offered by OS it is targeting at.
(Not sure if I have made myself clear...)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, it's not bad to use the Win32API. :-) But if you want cross-platform portability, you might want to consider using wxWindows and others cross-platform GUI and libraries.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using the API commands instead of pure C/C++ code will slow down my program?
Windows put out the win32API that is a simple MFC. Windows programs are slow by design, Gates has built an OS API ... his.
C++ can be very fast, the right compiler, and less trash code you write. C is the first, C++ started as a pre-compiler type tool back in the mid 1970's. Now C++, it is a full language that in maybe another 5 years, will leave its C past out in the cold.
i did not login:
j@ck_
So if i want to have a fast program i should use fprintf instead of WriteFile , etc?
<Using the API commands instead of pure C/C++ code will slow down my program?>
You're asking about adding a muffler or foglights or new tires to make the car go faster.. if your tires were shredded to begin with, new tires might help it go smoother and a little faster..
If you want fast code you should use win32asm.. which uses the win32api as well, but still your app has to contend with other apps and resource hogs running on your system, so your question is kinda irrelevant. It depends on what the program is intended for. If you want it to go really fast, write it using opengl or directx fullscreen and disable all background processes so your machine is tied up by your one program >)~ how to do that i gots no idea
There isn't much of a difference when using straight C(fprintf) or C++, not enough clock cycles to notice a difference. The main thing is how much overhead you don't mind putting up with.
- drarem
MFC and the API are not the same. MFC is a shitty wrapper around the API.
Kip
I think in many cases, using WIN32 API is faster and efficient than using C/C++ code (or run-time routines).
For example, fopen opens a file. Do you know what it does on its way to the file? It evertually calls the appropriate OS routine! On Windows platform, it calls CreateFile!
So bear in mind, C/C++ is a programming language, it has to use the infrastructure offered by OS it is targeting at.
(Not sure if I have made myself clear...)
No, it's not bad to use the Win32API. :-) But if you want cross-platform portability, you might want to consider using wxWindows and others cross-platform GUI and libraries.