Search:

Type: Posts; User: john.c

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Of course it doesn't. I vote to cancel...

    Of course it doesn't.

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

    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)
    ...
  3. Replies
    33
    Views
    1,375

    I vote to cancel this idiot's account.

    I vote to cancel this idiot's account.
  4. 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\"
    ...
  5. 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.
  6. 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...
  7. #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...
  8. total moron

    total moron
  9. Replies
    13
    Views
    888

    It's a truly stupid question.

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

    by john.c
    Replies
    16
    Views
    983

    Best to make no assumptions.

    Best to make no assumptions.
  11. 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).
  12. Replies
    4
    Views
    281

    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;
    ...
  13. Maybe you should change your username to RyanD....

    Maybe you should change your username to RyanD. :cool:
  14. Replies
    5
    Views
    280

    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:
  15. Replies
    8
    Views
    261

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

    Stucture's "solution" is total garbage. :wink:
  16. 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...
  17. Thread: Data type

    by john.c
    Replies
    5
    Views
    209

    You are truly an idiot. :wink:

    You are truly an idiot. :wink:
  18. 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) {
    ...
  19. Replies
    4
    Views
    187

    Nah. Format strings are notoriously fiddly...

    Nah. Format strings are notoriously fiddly things. :)
  20. Replies
    4
    Views
    187

    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.
    ...
  21. Thread: card game

    by john.c
    Replies
    1
    Views
    278

    card game - C++ Forum...

    card game - C++ Forum
    card game - C++ Forum
  22. Replies
    3
    Views
    276

    unbelievable

    unbelievable
  23. It depends on the compiler. The C++ standard...

    It depends on the compiler. The C++ standard apparently recommends supporting at least 256, although it is not required. In a sense all arrays are one-dimensional. Anything else is an array of arrays...
  24. Replies
    12
    Views
    562

    Yikes! :eek: I meant something much simpler,...

    Yikes! :eek: I meant something much simpler, like this:


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    #define MAX_PLAYERS 500
    #define MAX_NAME 100
  25. Replies
    12
    Views
    562

    @catacombs, It presumably looks something like...

    @catacombs, It presumably looks something like this:

    A B 123 Blue
    C D 210 Red
    E F 187 Blue
    G H 271 Green
    I J 194 Red
    K L 173 Green

    Where A B C D ... are standing in for first and last...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4