read all about it here printf - C++ Reference
C and C++ are the same for this topic
Type: Posts; User: dmh2000
read all about it here printf - C++ Reference
C and C++ are the same for this topic
for portability instead of using the homebrew word, dword etc types, use the standard types in stdint.h, like uint32_t, uint16_t etc. because for example in 64 bit programs, long and int might be the...
I think i am misunderstanding the question and answers here. I was referring to running in the debugger. I just looked at one of my many VS console apps, linker subsystem is set to console, ran the...
what is your platform? if you are on a PC, windows or linux, little endian is the native byte ordering so as long as your structure layout maps exactly to the format of the file header, you don't...
if you are using the debugger, you can set a breakpoint at the return statement in main. otherwise stopping to wait for user input is what you have to do.
the compiler wants a compare function that matches the prototype required by bsearch, namely int compare(const void *a,const void *b); your compare function has a different prototype. change compare...
looks right to me given the code you are showing. is your code there really what the assignment requires?
since the problem is small, do it by hand and record the results
the 3 times you call cvSaveImage, you give it a fixed filename. so yes it overwrites whatever was there before. you need to give that function a different filename each time you run. you could pass...
check two things: operator precedence of '==' vs '=' vs '||', and what value is '26' (hint, its not 26 decimal). best to put parentheses around each term you want to isolate in your expression....
you can still have the macro if your 'i' is size_t. you just would not need the cast in the macro.
nope
your description isn't clear. what do you mean buy 'index'? if each element has a value and an index, your example should show that. and it would help to show the initial state and the final sorted...
FLASH_TypeDef is just an alias for the structure.
// you can name the struct as you would if you were not typedef'ing it
struct xyz {
int a;
int b;
};
// create the alias
typedef...
use an array and an index instead of discrete variables to hold the digits. strip off each rightmost digit in the loop until num == 0
int d[8];
int index;
...
while(num is nonzero) {
...
first program :
(13): warning C4013: 'inputmarks' undefined; assuming extern returning int
it can be fixed by moving the code for inputmarks above the main. then it compiles with worse...
you mean like for a keylogger?
here is a good explanation of differing data type sizes for 64 bit platforms.
64-bit computing - Wikipedia, the free encyclopedia
your printfs don't really show the sequence of what is happening. i set a breakpoint on line 167 where it hits LOSE. the program exits the while loop as expected, but the main loop doesn't detect the...
when reading binary bytes, don't use fscanf. its extra overhead for nothing. how about this:
while(fread(&i,1,1,pFile) == 1) {
printf("%02X",i);
...
while its true that the various (void) and () declarations may be acceptable per the standard, it is bad form to have different definitions and declarations of a function (or variable, or anything...
probaby ecdsa.h includes a file that defines sha256_context
edit: or some other include file does. try commenting out the typedef of sha256_context in miracl.h and see what happens.
the popen function might do what you want.
since you are passing the address of a char array, you need to copy the string into it in myf. p is local to myf, so changing it in your function doesn't affect any value in main. but p is pointing...
make sure you really want to seed with time(); if you do, your results will not be repeatable and it will be harder to track down problems in your calcs. an alternative to using time(), pass in an...
be sure to use a tab for indentation, not spaces