Search:

Type: Posts; User: -Adrian

Page 1 of 20 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    13
    Views
    207

    Yes, I haven't tried XCode myself but it looks...

    Yes, I haven't tried XCode myself but it looks good on the surface and I suspect the Clang/LLDB integration is nice for writing C.
  2. Replies
    13
    Views
    207

    CodeBlocks for Mac appears to not be maintained....

    CodeBlocks for Mac appears to not be maintained. Have you considered XCode¹?

    ¹ Personally I'm against beginners using these unwieldy IDEs, because they have so many knobs and dials yet obscure the...
  3. Show us the code you have tried already, for...

    Show us the code you have tried already, for instance, you probably went with a loop of some kind.
  4. #include int foo (int q) // this...

    #include <stdio.h>

    int foo (int q) // this function is run when you call it, not wherever you write it down
    {
    int y = 1;
    printf("q=%i\n", q);
    return (q + y); // if q=5, this will...
  5. Thread: Slow forum?

    by -Adrian
    Replies
    11
    Views
    490

    @webmaster Did you check your logs for origin of...

    @webmaster Did you check your logs for origin of traffic? If the board was hammered by small number of IPs, then setting up something like fail2ban would be safer bet for the future, assuming this...
  6. Replies
    13
    Views
    221

    Oh, you're using templates! Sorry, totally missed...

    Oh, you're using templates! Sorry, totally missed that. As laserlight said, move the implementation into the header.
  7. Replies
    13
    Views
    221

    Have you added utilities.cpp to your project as a...

    Have you added utilities.cpp to your project as a dependency, so that it gets linked? (I don't know how VS works)
  8. Replies
    13
    Views
    221

    Put it as close to your use as is sensible, e.g....

    Put it as close to your use as is sensible, e.g.


    int main()
    {
    rngT rng;
    const auto result = Roll_DX_Ntimes(rng, 1, 2);
    }

    Avoid global variables except for edge cases (which are...
  9. Replies
    13
    Views
    221

    You're initializing an object in the header. That...

    You're initializing an object in the header. That is the problem, not the typedef.
  10. Replies
    13
    Views
    221

    And post your code if you still run into issues.

    And post your code if you still run into issues.
  11. Thread: Slow forum?

    by -Adrian
    Replies
    11
    Views
    490

    I feel the same. Does the admin need help? I'm...

    I feel the same. Does the admin need help? I'm going to assume that whoever is sending all these queries isn't so sophisticated that static or dynamic block rules couldn't be put into place. I don't...
  12. I'm not sure what exactly your question is, but...

    I'm not sure what exactly your question is, but the errors point to:


    Your glibc being too old
    Apache needing to be compiled with mod_so module support


    So naturally, you'd want to upgrade...
  13. Replies
    14
    Views
    330

    He just told you, and you already have the code....

    He just told you, and you already have the code. So what's the hold up? If you didn't write this code and didn't pay attention in class, then we're not going to do your homework.
  14. You can capture (by value) the pointer to your...

    You can capture (by value) the pointer to your class object:


    bool IncorrectScale = any_of(Loadout.begin(), Loadout.end(), [this](auto& weapon) { return weapon->WeaponScale != PlayerScale; });
  15. Thread: Slow forum?

    by -Adrian
    Replies
    11
    Views
    490

    Ah so that's why, I see. I contacted the...

    Ah so that's why, I see. I contacted the webmaster and he said something about "scraping effort" but I totally misread that as something he is doing himself to free the forum/db of old cruft.
    ...
  16. Thread: Slow forum?

    by -Adrian
    Replies
    11
    Views
    490

    Slow forum?

    The forum has been slow to the point of being unusable the past week. Takes me about 5-10 seconds to get a handshake, 30-40 seconds for the page the render (if I'm lucky and the request don't just...
  17. Replies
    3
    Views
    165

    Did you pass the paths relative to your...

    Did you pass the paths relative to your CMakeLists.txt as I showed in my example? Also, what do you do to invoke CMake? Looks like one needs to create the Codeblocks project through the CLI first,...
  18. Replies
    3
    Views
    165

    First of all, let me assure you that your anger...

    First of all, let me assure you that your anger is warranted. CMake documentation is an utter mess (the entire world agrees), and CMake itself doesn't have a good approach/syntax either – it's just...
  19. Clearing the map will free all the smart pointers...

    Clearing the map will free all the smart pointers it contains, yes.
  20. Replies
    6
    Views
    293

    A narrowing conversion is the inverse of your...

    A narrowing conversion is the inverse of your example, storing a larger type (e.g. an int) in a smaller one (e.g. a short). Since the smaller type cannot represent the entire possible range of values...
  21. You'd have to know what you're doing (i.e. know...

    You'd have to know what you're doing (i.e. know what the program needs to function) and then manually delete those files. If you have enough disk space, save yourself the time and don't let it bother...
  22. Replies
    6
    Views
    411

    Also, consider switching to CMake unless close...

    Also, consider switching to CMake unless close handling the compilation/linking process is desired (for learning).
  23. Replies
    2
    Views
    180

    e.g. #include void...

    e.g.


    #include <stdexcept>

    void get_Website(const std::string& url)
    {
    if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) {
    throw std::runtime_error("WSAStartup failed");
    }
  24. A good free introduction to C++ is learncpp.com...

    A good free introduction to C++ is learncpp.com. The chapters are numbered, so you can just follow the designated order. For a video series covering a multitude if C++ topics, check out...
  25. Replies
    20
    Views
    1,117

    The latter. The scanf results in the memory you...

    The latter. The scanf results in the memory you passed being written to. That memory "lives" in main so of course the change is visible there.

    If you insist on creation an array inside a function...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4