User Profile

Collapse

Profile Sidebar

Collapse
RobRussell
RobRussell
Last Activity: Dec 4 '07, 03:54 PM
Joined: Nov 6 '07
Location: Canada
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • RobRussell
    replied to Protecting source code
    in PHP
    This would exclude all visitors coming directly from, for example, Google. Or any link outside of your site. This is, in general, not what anybody would ever want to use on their site. Ever.

    As a matter of fact spiders wouldn't necessarily set the referrer to be anything on your site so it'd look to spiders like your whole site contains nothing but the error page text.

    The referrer string is sent by the user agent at...
    See more | Go to post

    Leave a comment:


  • RobRussell
    replied to Structure Variables within C language
    in C
    Well if your data is sorted you could look at bsearch().
    See more | Go to post

    Leave a comment:


  • RobRussell
    replied to delete operator in c++
    in C
    The best way to find it is to start by adding error checking. For example:
    [CODE=cpp]
    abc::abc()
    {
    off=0;
    img = NULL;
    }
    ...
    abc::~abc()
    {
    if (img) {
    delete(img);
    }
    img = NULL;
    }
    [/CODE]

    Adding the code will benefit you in the long run because it will catch the problem every time - even if it shouldn't happen...
    See more | Go to post

    Leave a comment:


  • RobRussell
    replied to scripts and C++
    in C
    I guess they mean something more like a script that can be hosted in C++. I've been working on getting something like this going myself actually. In my case it's Lua running in a C++ app ( sorry, but our Posting Guidelines consider this spam... ).

    Lua is designed to be embedded and the license for the interpreter is MIT so it's pretty liberal. It's popular for scripting in games. It's one thing to get the interpreter embedded in to...
    See more | Go to post

    Leave a comment:


  • RobRussell
    replied to Structure Variables within C language
    in C
    Well to start with, all caps (like NAME) is usually a precompiler constant in C, so you should use something like Name or name_s to represent that struct.

    To your problem, you'll need a loop like for() or while(). You'll want to declare an array of your structure large enough to hold them all. I'm not sure what you mean about k, but if you post some code or pseudocode that gives a better idea then maybe others can help more.
    See more | Go to post

    Leave a comment:


  • RobRussell
    replied to C->Linux issue with filename construction
    in C
    Your solution looks okay to me. The only thing I might do differently is subtract the length of an EOL where an EOL is "\n" on some systems and "\r\n" on others.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...