|
Hi I try to compile my project and it says this?
I dont know what it means. i guess the windows.h file or something, but i dont get it?
Can someone please help me
Thanksompiling...
DeltaGlider.cpp
c:\windows\desktop\orbiternew\orbitersdk\include\orbitersdk.h(12) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Error executing cl.exe.
DeltaGlider.obj - 1 error(s), 0 warning(s)
thats what i get.
Kevin
Im just learning! What can I say?
|
|
|
|
|
My guess is that instead of <windows.h> you have used "windows.h".
Replace the "s with the angle brackets
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
I trying to make my app run idle in the taskbar. When I look at the Task Manager my program always has 99% of the CPU. Yet other programs (like Windows Messanger or my virus scanner) sit at 0%. Do I need to mess with the priority? Can I some how cut out the message loop? Any information would be appriciated.
Thanks,
Chris
|
|
|
|
|
Your app is obviously working. Figure out what it is doing, stop it, and it will be idle.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Well, all Im running is the message pump. (PeekMessage then TranslateMessage & DispatchMessage). Is there a safe way to stop the message pump ?
|
|
|
|
|
PeekMessage Does not block if the message queue is empty, use GetMessage instead.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Are you using GetMessage you in your message loop or PeekMessage?
Do you have more than one thread?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
is there a way to send a variable in a function that is a table
i declare it x[10][10]
and send it in function(x[][]) like this or an other way
|
|
|
|
|
|
ok... hi all
ive bean kindof relient on Kilowatt. "sorry kilowatt"
now my question...
i want to random a number betwean 1-10.
i looked up rand()... automatically i thought that you could just put the number that you want to be randomized in the ().... like for example
rand(10)... that didnt work.
there is srand also...
why wont the rand(10) work... and, how do i work rand()?
Thanks all!
~SilverShalkin
|
|
|
|
|
Do a rand()%10 to generate a number between 0 and 9
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
i tried that....
cout << rand()%10 << endl;
this repeats 1..
Thanks
~SilverShalkin
|
|
|
|
|
Yes it will, because you havent srand'd first :-
srand((unsigned)time(null));
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
ok...
give me an example from head to toe, about required headers... srand, RAND_MAX, and rand().
because ive tried everything, and its still doesnt work.
~SilverShalkin
ps... #include <cstdlib> i think thats the header
|
|
|
|
|
#include "stdafx.h"
#include <stdlib.h>
#include <time.h>
int _tmain(int argc, _TCHAR* argv[])
{
srand((unsigned)time(NULL));
for(int i=0;i<10;i++)
printf("%d\n",rand()%10);
return 0;
}
My output :-
D:\Projects\test\Debug>test.exe
6
5
2
0
8
0
3
1
5
0
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
I am looking how to add agent support to my MFC app and i want the merlin character to load automatilcy without a Open Dialog.
CF
Buy ChrisBrand!
|
|
|
|
|
|
Is it possible for an Executable to export functions just like a dll? I added a .def file to my project, it compiler good and using the dependency walker i saw it was exporting the functions, but when i use them from outside it crashes/does nothing. Is it possible?
Thanks
|
|
|
|
|
I think to do that, you'd have to write an EXE COM server.
Nish
p.s. pardon my crude terminology, but my COM aint great, not yet
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Sein wrote:
Is it possible for an Executable to export functions just like a dll?
Yes, and sometimes .exe's do just that when people define the wrong macros or include the wrong header files that are intended to only be defined when creating a function exporting library.
I added a .def file to my project, it compiler good and using the dependency walker i saw it was exporting the functions,
There you go, you have exported the symbols!
but when i use them from outside it crashes/does nothing.
So long as you obey all the rules obeyed by a DLL that has no initialization code whatsoever, and you LoadLibrary yourself it will work just fine. A PE is a PE is a PE... (Portable Executable).
May I suggest you read up a bit on how PE, DLL's, compiler runtimes in general and such actually works before even trying to do something like this? I've got around seven years of heavy Win32 development under my belt, and I've never encountered a situation like yours (that wasn't a design error).
|
|
|
|
|
Here's my code:
ifstream MyFile( "somefile.txt" );
MyFile.ignore( someNumber , '\n' );
What I want to do is have the someNumber be infinity, or just have the program ignore until the program reaches a '\n' character. Should I just make someNumber a really, really big number or is there a way to say, ignore until you find a '\n' characer.
-Raffi
|
|
|
|
|
Won't reading in an entire line do that for you ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Since ignore() takes only an integer (not a size_t) you can only skip 2^31 (around 2 giga-) chars. If you want something closer to infinity you'd probably have to use OS dependent integral types.
If you accept 2GB as the limit for the first newline character, you could use INT_MAX from <climits>.
|
|
|
|
|
Hi, Is there a way to have a dialog based application consisting of several pages? For example, I am trying to create a credit card application: In the first Dialog box you would input your personal info. How do I go about having a "Next" button that will send me to the next page or dialog box where I would input my "employment info" and so on.
Thank you very much
ps. I am a beginner
|
|
|
|
|
Yes, that's easily done using a "wizard" interface, similar to an installer dialog. You'd need to use a CPropertySheet as your main dialog. Each page would be a CPropertyPage . You'll need to call SetWizardMode() (I think that's what it's called) on the property sheet to enable it's wizard mode.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|