Search:

Type: Posts; User: mad-hatter

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. h*b=flaeche; printf("\nDie Fläche des...

    h*b=flaeche;
    printf("\nDie Fläche des eingegebenen Rechtecks ist %lf\n",flaeche);

    should be
    flaeche = h*b;
  2. //bool hasWon = false; const int size = 10;...

    //bool hasWon = false;
    const int size = 10;
    bool arr[size] = {0};

    int count = 0;
    for (int i = 0; i < size; i++) {
    if (arr[i]) {
    count += 1;
    }
    }
  3. Hello userxbw, I don't think its an OS...

    Hello userxbw,

    I don't think its an OS problem.
    When the program is running, it knows what to do with mouse cliick events and the keyboard.
    What I want to do is on a menu item click, send the...
  4. Hello. Thanks. I still need to 'cout' right...

    Hello.

    Thanks.
    I still need to 'cout' right mouse click.

    Regards


    cout << right mouse click;
    cout << "circle\n";
  5. C++ - How to 'fprintf' a right mouse click

    Hello,

    If I right click the mouse and type 'circle'/return then '10,10'/return then '15'/return,
    the program does what is ecpected.

    I'm running this code from a menu click and would like to...
  6. Hello, Some files are repeated, 00182 and...

    Hello,

    Some files are repeated, 00182 and 00146.
    A random number generator can repeat the same number, they are not unique they are random.
    If you want no repeats, you have to make some sort of...
  7. Replies
    3
    Views
    451

    Hello, The compiler is clever enougth to work...

    Hello,

    The compiler is clever enougth to work out which is a function and which is a variable.
    It is permitted but considered bad practice, it can lead to confusion when the code gets more...
  8. Hello, %d and %f are different number formats,...

    Hello,

    %d and %f are different number formats, integer versus float.

    printf - C++ Reference

    Regards
  9. Replies
    2
    Views
    979

    Have a look here:- c++ - Why isn't sizeof for a...

    Have a look here:-
    c++ - Why isn&#39;t sizeof for a struct equal to the sum of sizeof of each member? - Stack Overflow
  10. Replies
    0
    Views
    2,695

    C++ - Eject USB stick

    Windows 10

    Hello,

    I've got a Sandisk Cruzer inserted in a USB hub.
    With the code included I can eject & unmount the stick.
    It does'nt show in Windows after I run the code, so I'm guessing it...
  11. Replies
    4
    Views
    1,142

    Hello, Thanks for the code. Is this better?...

    Hello,

    Thanks for the code.

    Is this better?


    if ( (infile.read((char *)buff.data(), size)).eof() )
    {
    std::cout << "EOF reached!" << endl;
  12. Replies
    4
    Views
    1,142

    C++ / Qt5.8 - Read file into char vector

    Hello,

    I'm reading a USB stick into an unsigned char vector.
    Not a problem, Method 1 is obviously faster than Method 2.
    As you can see I'm reading into a buffer and then putting the data into...
  13. Hello, You've got to seed the random number...

    Hello,

    You've got to seed the random number call.

    Have a look here at the last post.
    Generating random integer values within a range in C - Stack Overflow

    and why the ';' after the '}' ?
    ...
  14. Hello, Not yet, but playing. Thanks. ...

    Hello,


    Not yet, but playing. Thanks.

    Regards


    int main()
    {
  15. Hello. algorism Opening (rb) makes a lot...

    Hello.

    algorism
    Opening (rb) makes a lot of difference (my mistake).
    fread whole structure (again my mistake), I was printing upto a
    certain point in the structure.

    Elkvis
    I'm...
  16. fpos_t Object containing information to...

    fpos_t

    Object containing information to specify a position within a file
    This type of object is used to specify a position within a file. An object of this type is capable of specifying...
  17. Hello algorism, Windows 10 - 32 bit gcc...

    Hello algorism,

    Windows 10 - 32 bit
    gcc version 5.3.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)

    Compiling from within Qt Creator 4.2.0

    *.pro file
    CONFIG += console
    ...
  18. C++ - Get current position of file pointer.

    Hello,

    I'm trying to get the file pointer position.
    The result I'm getting is 4096 when I know its less.
    I understand that the 4096 is probably the cluster size.
    I know I can count the read...
  19. Hello Codeplug, Thanks for that. Reverted to...

    Hello Codeplug,

    Thanks for that.
    Reverted to the original method.

    Regards


    int newPos = 2048;
  20. C++ - Trying to use SetFilePointer & SetFilePointerEx to read USB device

    Hello,

    Windows 10
    gcc 5.3.0

    I'm opening a USB memory stick for read.
    I can read the beginning of the stick ok, then I try to reset
    the file pointer to another position and fail.
    What am I...
  21. Hello, Found this a long time ago, a quick...

    Hello,

    Found this a long time ago, a quick runtime check.
    This works with gcc, don't know about the MS compiler.


    unsigned int max = -1;
    printf("max = %u\n", max);//max = 4294967295
    Regards
  22. C++/Qt5.7.1 - How to get file info from a Multi-partitioned SD card

    Hello,

    Windows 10

    How to get file info from a Multi-partitioned SD card.
    I understand that Windows does not recognise extra partition/s on an SD card.
    So far I've managed to get the info...
  23. How to detrmine if a Windows partition is primary or logical

    Hello,

    How to detrmine if a Windows HDD partition is primary or logical using 'C' or 'C++'.

    Thanks.

    Regards
  24. Replies
    5
    Views
    725

    Hello, Isn't a bool just true or false? ...

    Hello,

    Isn't a bool just true or false?

    Regards
  25. Hello, The GNU C Library: Infinity and NaN...

    Hello,

    The GNU C Library: Infinity and NaN

    or maybe something like:-

    if (myNumber == 16331239353195370)
    {
    //do something)
    }
Results 1 to 25 of 56
Page 1 of 3 1 2 3