Search:

Type: Posts; User: dmh2000

Page 1 of 20 1 2 3 4

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    1,654

    read all about it here printf - C++ Reference...

    read all about it here printf - C++ Reference

    C and C++ are the same for this topic
  2. for portability instead of using the homebrew...

    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...
  3. Replies
    12
    Views
    1,824

    I think i am misunderstanding the question and...

    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...
  4. what is your platform? if you are on a PC,...

    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...
  5. Replies
    12
    Views
    1,824

    if you are using the debugger, you can set a...

    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.
  6. the compiler wants a compare function that...

    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...
  7. Replies
    4
    Views
    751

    looks right to me given the code you are showing....

    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
  8. the 3 times you call cvSaveImage, you give it a...

    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...
  9. Replies
    3
    Views
    2,609

    check two things: operator precedence of '==' vs...

    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....
  10. you can still have the macro if your 'i' is...

    you can still have the macro if your 'i' is size_t. you just would not need the cast in the macro.
  11. Replies
    5
    Views
    1,559

    nope

    nope
  12. Replies
    5
    Views
    1,559

    your description isn't clear. what do you mean...

    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...
  13. Replies
    6
    Views
    2,068

    FLASH_TypeDef is just an alias for the structure....

    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...
  14. Replies
    12
    Views
    1,312

    use an array and an index instead of discrete...

    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) {
    ...
  15. Thread: pointer doubt

    by dmh2000
    Replies
    3
    Views
    994

    first program : (13): warning C4013:...

    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...
  16. Replies
    6
    Views
    1,540

    you mean like for a keylogger?

    you mean like for a keylogger?
  17. Thread: Unions.

    by dmh2000
    Replies
    13
    Views
    1,920

    here is a good explanation of differing data type...

    here is a good explanation of differing data type sizes for 64 bit platforms.
    64-bit computing - Wikipedia, the free encyclopedia
  18. your printfs don't really show the sequence of...

    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...
  19. Replies
    13
    Views
    1,672

    when reading binary bytes, don't use fscanf. its...

    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);
    ...
  20. Replies
    15
    Views
    1,963

    while its true that the various (void) and ()...

    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...
  21. probaby ecdsa.h includes a file that defines...

    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.
  22. Replies
    2
    Views
    1,223

    the popen function might do what you want.

    the popen function might do what you want.
  23. Replies
    2
    Views
    626

    since you are passing the address of a char...

    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...
  24. Replies
    7
    Views
    1,556

    make sure you really want to seed with time(); if...

    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...
  25. Replies
    2
    Views
    846

    be sure to use a tab for indentation, not spaces

    be sure to use a tab for indentation, not spaces
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4