Search:

Type: Posts; User: john.c

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Maybe more like this. (Sorry, but I couldn't test...

    Maybe more like this. (Sorry, but I couldn't test it).


    void FindFile(std::wstring dir)
    {
    dir += L"\\*";

    WIN32_FIND_DATAW file;
    HANDLE search = FindFirstFileW(dir.c_str(),...
  2. Your code has an error, although it doesn't show...

    Your code has an error, although it doesn't show up in your example since you are creating a square matrix.


    // In allocateData2DbyMalloc, this
    for (unsigned int i = 0; i < nColumn; ++i)...
  3. You don't know what you're talking about....

    You don't know what you're talking about.
    There's no difference.
  4. Of course it doesn't. I vote to cancel...

    Of course it doesn't.

    I vote to cancel "Structure's" account.
  5. Replies
    5
    Views
    466

    As usual, "Structure" doesn't even bother reading...

    As usual, "Structure" doesn't even bother reading the question.


    double roundUpDecimalPlaces(double x, int decimalPlaces) {
    double mag = 1.0;
    for (int i = 0; i < decimalPlaces; ++i)
    ...
  6. Replies
    33
    Views
    1,431

    I vote to cancel this idiot's account.

    I vote to cancel this idiot's account.
  7. It presumably needs to be something like this...

    It presumably needs to be something like this (all on one line):


    link.exe
    /nologo
    /subsystem:windows
    /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib\x64\"
    ...
  8. When you are not logged in, an ad is shown in...

    When you are not logged in, an ad is shown in that location.
    Since you are using an ad-blocker, it appears as a blank space.
  9. You need to link against the library that defines...

    You need to link against the library that defines that windows function. According to the documentation, the library is User32.lib. I don't use windows so I'm not sure of the command line syntax, but...
  10. #include #include inline...

    #include <iostream>
    #include <string>

    inline char get_char_at(const std::string& s, int row, int col) {
    return s[(row + col) % s.size()];
    }

    int main() {
    std::string s;
    for...
  11. total moron

    total moron
  12. Replies
    13
    Views
    915

    It's a truly stupid question.

    It's a truly stupid question.
  13. Thread: char*

    by john.c
    Replies
    16
    Views
    1,003

    Best to make no assumptions.

    Best to make no assumptions.
  14. It would be slower to do it that way then to just...

    It would be slower to do it that way then to just search the file in one piece (with one thread).
  15. Replies
    4
    Views
    292

    The answer is just the binary representation of M...

    The answer is just the binary representation of M - 1 given in N bits, where 0 is represented by A and 1 by B.


    #include <iostream>

    int main() {
    int n, m;
    std::cin >> n >> m;
    ...
  16. Maybe you should change your username to RyanD....

    Maybe you should change your username to RyanD. :cool:
  17. Replies
    5
    Views
    313

    Try to figure it out yourself? You obviously...

    Try to figure it out yourself?

    You obviously aren't very smart if you think stahta01's name is "Bill". I guess you think my name is "Carl".

    Have a nice day!!! :cool:
  18. Replies
    8
    Views
    275

    Stucture's "solution" is total garbage. :wink:

    Stucture's "solution" is total garbage. :wink:
  19. The basic answer is that you already know how...

    The basic answer is that you already know how many records there are. Three. Problem solved.

    If you wish to calculate the size, then in the case of a statically-allocated array for which you have...
  20. Thread: Data type

    by john.c
    Replies
    5
    Views
    224

    You are truly an idiot. :wink:

    You are truly an idiot. :wink:
  21. That's exactly what your loop says: "while no key...

    That's exactly what your loop says: "while no key has been pressed, keep looping" (i.e., stop as soon as a key is pressed).

    Presumably you want something more like:


    while (true) {
    ...
  22. Replies
    4
    Views
    202

    Nah. Format strings are notoriously fiddly...

    Nah. Format strings are notoriously fiddly things. :)
  23. Replies
    4
    Views
    202

    Two problems. If name and traits are wchar_t...

    Two problems. If name and traits are wchar_t strings then you need to put an l (lowercase L) before the opening square brackets in %[^*] and %[^\n]. They don't automatically read wchar_t strings.
    ...
  24. Thread: card game

    by john.c
    Replies
    1
    Views
    286

    card game - C++ Forum...

    card game - C++ Forum
    card game - C++ Forum
  25. Replies
    3
    Views
    285

    unbelievable

    unbelievable
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4