Search:

Type: Posts; User: -Adrian

Page 1 of 20 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    146

    If the files were always just: ...

    If the files were always just:


    <Flowchart.Variables>
    <Variablex:TypeArguments="x:String"Name="strDebugDt"/>
    <Variablex:TypeArguments="x:String"Name="strMailFilter"/>...
  2. Replies
    28
    Views
    352

    Post your current code, even if incomplete. No...

    I was able to do that. But I used int instead of double. Is double and int the same thing?
    [/QUOTE]
    Post your current code, even if incomplete. No point switching topics before you got that right....
  3. Replies
    7
    Views
    146

    How predictable is the structure of the XAML...

    How predictable is the structure of the XAML files? If it could be just about anything, then you'll have a hard time writing a robust solution yourself – parsing of a full grammar is a difficult...
  4. You can escape double quotes with a backslash...

    You can escape double quotes with a backslash like so:


    printf("\n\"QUIT\"");
  5. Thread: C++ Challenge

    by -Adrian
    Replies
    4
    Views
    284

    Btw, the struct keyword is superfluous in type...

    Btw, the struct keyword is superfluous in type declarations. Any struct Node* in your function can just be Node*.
  6. Replies
    2
    Views
    389

    Welcome rcman!

    Welcome rcman!
  7. I had a good time learning with learncpp.com...

    I had a good time learning with learncpp.com, I think it's well structured/paced to get started and fairly comprehensive. I keep recommending it to anyone asking this.
  8. Replies
    9
    Views
    275

    Way cool! :D

    Way cool! :D
  9. I'm only aware of Fortran in that respect. I...

    I'm only aware of Fortran in that respect. I think it's due to guarantees the language makes regarding aliasing. Maybe as LLVM improves further, Rust could benefit from such guarantees too, but...
  10. Replies
    2
    Views
    193

    What part confuses you? This looks like what one...

    What part confuses you? This looks like what one would expect. Do you know that an int takes 4 bytes¹ of memory? So the union only takes 4 bytes even though it contains 3 ints. If it was a regular...
  11. If you insist on discussing semantics, you won't...

    If you insist on discussing semantics, you won't get a universal answer.


    void foo(int a); // passing an integer
    void foo(int* a); // passing a pointer to an integer

    You know these two, you...
  12. The former – it passes the address, not the...

    The former – it passes the address, not the content.
  13. Replies
    5
    Views
    399

    if (num2 == 0) { // not '0' However, comparing...

    if (num2 == 0) { // not '0'

    However, comparing a float to 0 isn't quite as simple as that either, so I would recommend you declare num2 as an integer (num1 can stay float). It's complicated ;)
  14. Replies
    5
    Views
    399

    You could try that yourself as an exercise! Place...

    You could try that yourself as an exercise! Place an extra check inside the else-if section for division. If the user tries to divide by 0, you could then print a message and go to the next iteration...
  15. Replies
    7
    Views
    370

    exercise2.cpp:17:19: error: C++ requires a type...

    exercise2.cpp:17:19: error: C++ requires a type specifier for all declarations
    void read_ages(&name, n) // member function
    ^
    exercise2.cpp:17:25: error: unknown type name 'n'
    ...
  16. Replies
    7
    Views
    370

    Do you come from another programming language?...

    Do you come from another programming language? You should have learned about function calls and scopes before touching the class construct. Go back to the section about functions and how to define...
  17. Replies
    5
    Views
    399

    Without having put much thought into this, here...

    Without having put much thought into this, here is a quick solution:


    if (op == 'x')
    {
    cout << "Are you sure you would like to exit?" << endl;
    cout << "Enter y to exit" << endl;
    ...
  18. Replies
    2
    Views
    280

    int main (void) { int a = 5; // 'a' starts...

    int main (void)
    {
    int a = 5; // 'a' starts existing here
    printf ( "\n a : %d", a);

    function(); // 'b' starts existing and stops existing here

    return 0; // 'a'...
  19. You should post this in the C++ forum, as this...

    You should post this in the C++ forum, as this isn't C.

    What the error message do you get? Also, you're missing a template declaration on line #20, in case that wasn't just lost in the copy/paste.
  20. // 4 byte object, 8 byte (64bit) address char...

    // 4 byte object, 8 byte (64bit) address
    char x[4];
    sizeof(x) -> gives 4
    sizeof(&x) -> gives 8

    // 16 byte object, 8 byte address
    struct sockaddr_in sa;
    sizeof(sa) -> gives 16...
  21. Replies
    13
    Views
    299

    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.
  22. Replies
    13
    Views
    299

    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...
  23. 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.
  24. #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...
  25. Thread: Slow forum?

    by -Adrian
    Replies
    11
    Views
    645

    @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...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4