argv[1] is a char-string, not a number.
To convert it to an int look up atoi().
/btq :)
Type: Posts; User: btq
argv[1] is a char-string, not a number.
To convert it to an int look up atoi().
/btq :)
what is it more exactly that you want to do ?
Are you writing self-modifying-code ?
If so, putting the code on the stack and calling it is
perfectly accebtable(like you did).
Although if you...
your problem is here:
void main(void)
{
srand(time(NULL));
void testDeleteAtPos (void); // <---- here
}
IIRC, on windows you can call the function VirtualProtect to
to make a text-segment writable for these types of operations.
/btq :)
basically you need to supply a template dialog and a
hookprocedure to your OPENFILENAME structure.
I found this quite informative. Click on "Open and Save As dialog boxes" in the left frame....
I remember seeing someone asking this and the answer
was simply "you can't" . Here's a draft of the irc-log (names erased, 3 persons and no 1 is the one asking the question ):
maybe this is...
uhmm...it's been a long time since I messed around with this.
Here's what I did:
HDC myDC = CreateCompatibleDC(originalDC);
HBITMAP myBMP = CreateCompatibleBitmap(myHDC);...
In devc++ just choose file->new->project and select DLL.
/btq :)
hmmm..when you said
,does this apply to all functions, ie, you can't use a single function
from you lib ?
like I said it's really hard to solve this without seeing the code.
I suggest you...
yes, it's like that.
How do you include the .lib file ? "Add existing" or in
"project properties->linker->inputs->Additional dependencies" ?
Don't know what the difference is really, both of the...
I'm really sorry about pointing you in the wrong direction :(
It's really hard to tell what's wrong without seeing the code
(or rather the project ).
Can you upload the soultion/projects ?
...
the .lib files only tells the compiler where the functions reside
inside the dll. You must put the dll inside your programs library.
There are no code in the .lib file, it's just an import...
just don't do it if you have doubts. You might not only hurt someones feelings but you may also make it hard for yourself.
Leaving for a year, not knowing what is goin on.
I would avoid situations...
ehhrmm...I should've just done this in the first place, sorry about that :
# ifndef BUTTON_H
# define BUTTON_H
#ifdef export
#define MYLIBAPI extern "C" _declspec(dllexport)
//this goes in the header
#ifdef export
#define MYLIBAPI extern "C" _declspec(dllexport)
#else
#define MYLIBAPI extern "C" _declspec(dllimport)
#endif
MYLIBAPI int MyFunctionInDaLib(int,int)...
are you sure you're exporting/importing it right ?,
ie, using the "_declspec(dllexport) / _declspec(dllimport)" correct ?
what does the header look like where the functions are declared ?
/btq :)
this is just a pure guess as I don't know the compiler or what linker it uses, but it seems out-dated as old apps are
often restricted to 256-byte-strings when accessing various
functions in the...
..or go to http://betov.free.fr/SpAsm.html and download x86eas.hlp
which is pretty much the same but alot faster to use imo :)
/btq
or if one want something lighter but still quite enough to get
started I suggest MadWizards tutorial . (<---- this l wont move! :) )
cheers
/btq :)
I haven't really seen a tutorial on asm and c++ but I think
you'll be best of learning pure asm first, workin with registres etc.
You might wanna consider downloading masm32 an perhaps
and editor...
you can neglect the .h but the you need to put a 'using namespace std' or a std::-prefix before the functions.
/btq :)
the books are probably some of the best books written in the genre the last decade. They are not filled with the usual rubbish that
todays childrens books are.
Haven't read no5 yet but it's here...
the argument to cos isn't in degrees, it's in radians
Convert degrees to radians using:
radian=degree*(pi/180)
so
#define _USE_MATH_DEFINES //to define M_PI
#include <math>
hmm...I recall bein at a friends house doing this a year ago or so. I think we made a
wrapper for it: a windows-application calling CreateProcess
creating the console window, and using...
thanks for the help but after some experimenting
it seems the only way to go is to ditch the nested loops.
Seems to be the only way to get the effeiciency needed.
The sad part is that it will...