cacti
+ Reply to Thread
Results 1 to 15 of 19

Thread: Source code

Hybrid View

  1. #1
    Join Date
    Apr 2007
    Posts
    27

    Source code

    ok so i got this source code and i need to compile it, but it wont let me compile it because its giving me some errors and i dont know how to fix them im using dev-C++ complier if someones willing to help maybe look at the code and see if theirs errors"?

  2. #2
    Join Date
    Sep 2006
    Posts
    1,649
    Sure. Post the code here, and if possible, the errors you're getting.

  3. #3
    Join Date
    Sep 2005
    Posts
    2,050
    Yeah, we'll need those errors.

  4. #4
    Join Date
    Apr 2007
    Posts
    27
    ok well the code is to long so its not letting me type it all in, any other way?
    Last edited by mlg solidsnake; 04-28-2007 at 06:17 PM.

  5. #5
    Join Date
    Sep 2005
    Posts
    2,050
    Split it into two posts or upload it to [url]www.divshare.com[/url].

  6. #6
    Join Date
    Apr 2007
    Posts
    27
    [url]http://www.divshare.com/download/50****-*e2[/url]

  7. #7
    Join Date
    Sep 2006
    Posts
    1,649
    I think I see what the problem is.

    The highlited error is given because the function get_keys() is a type void function. Functions with type void do not return an assignable value.

    In other words, you cannot assign the result of a type void function to an int, char, bool, or any other type of variable. For example:

    Code:
    //psuedocode, may not be correct syntax, but a general idea
    int blah(x)
    {
      X*2
    }
    The function blah() will take user input and do something. You can then assign this to something. So if the user entered 6, he would get the number *2 and be able to assign *2 to another variable.

    Void functions are usually just for repetitive tasks, such as re*****ing the screen every minute, and other such tasks.

  8. #8
    Join Date
    Sep 2005
    Posts
    2,050
    That's true Moonbat, but the function returns an integer (int). The void is in between the ( and ) to indicate that it takes no parameters. Without the full errors, there's not really much I can say, apart from I don't think you've linked in all the necessary libraries for Windows, or perhaps you are trying to compile this code as a C++ project in Dev-Cpp when in fact it is C code. I thought they were interchangeable, but it's something to try.

  9. #9
    Join Date
    Aug 2006
    Posts
    233
    instead of //psuedocode <-- try -->//pseudocode <--??
    Code:
    //psuedocode, may not be correct syntax, but a general idea
    int blah(x)
    {
      X*2
    }
    Well my limitation on coding is awesome...lol
    jabber: gh05t*d@jabb*r.org Email: gh05t*d@hack.cl

    Internet security is as real as your Dreams !

  10. #10
    Join Date
    Sep 2005
    Posts
    2,050
    Nah noz, that was just a comment. In C++, comments are text that is ignored by the compiler, like labels on the code that don't affect the final program. Comments in C++ are either the whole line after // or between /* and */.

    I've also come to the conclusion that it was badly-written code. I s***ested a few things though which he could have tried, and he could have included the full error messages.

  11. #11
    Join Date
    Sep 2006
    Posts
    1,649
    A function that takes no parameters (a void function) cannot return an assignable value. So therefore, even if the overall function does return an int, you can't assign it to any other variable.

  12. #12
    Join Date
    Sep 2005
    Posts
    2,050
    Quote Originally Posted by Moonbat View Post
    A function that takes no parameters (a void function) cannot return an assignable value. So therefore, even if the overall function does return an int, you can't assign it to any other variable.
    Though I haven't done any C++ programming in a while, I know that functions that take no parameters can return values if they're not preceded by void. Functions' return values are dictated by the type stated before them,
    Code:
    int SomeFunction()
    {
    /* Do something */
    return *;
    }
    
    int aaa = 0;
    
    aaa = SomeFunction();
    In this case, SomeFunction returns an integer. It has no parameters.

    A function declared to return void, however, can't return anything -- it has no return statement:

    Code:
    void SomeFunction()
    {
    /* Do something */
    }
    
    SomeFunction();
    A function that takes no parameters (a void function) cannot return an assignable value.
    A void function in my definition is a function declared as type void (void SomeFunction()). One that doesn't take any parameters is just a function without parameters.
    Last edited by Ezekiel; 04-29-2007 at 04:16 PM.

  13. #13
    Join Date
    Sep 2006
    Posts
    1,649
    Ah, okay, I was getting a little confused.

    The get_keys() function in the keylogger code was written int get_keys(void). I got a little confused.

  14. #14
    Join Date
    Apr 2007
    Posts
    27
    so it seems to me theirs no hope for this source code lol
    +=_-Free Kevin!! +=_-

  15. #15
    Join Date
    Sep 2006
    Posts
    1,649
    I'm guessing it's some badly written code.

    Either that, or the guy made mistakes on purpose so only experienced code gurus would know what to do with it. Either way, I'm not sure.

+ Reply to Thread

Similar Threads

  1. Msn Fake login Page source code here!!!
    By carlo in forum Internet Privacy
    Replies: 6
    Last Post: 01-14-2010, 08:14 PM
  2. I Need The Myspace.com View Source Code!!!!
    By Thrash_Man in forum General discussion
    Replies: 1
    Last Post: 06-05-2008, 11:33 AM
  3. Need help getting source code for mysql.
    By ilyacella621 in forum Internet Privacy
    Replies: 2
    Last Post: 05-12-2007, 07:49 PM
  4. Ping of Death C source code
    By Moonbat in forum Internet Privacy
    Replies: 3
    Last Post: 09-26-2006, 11:49 AM
  5. Fake hotmail log in source code.
    By carlo in forum Internet Privacy
    Replies: 0
    Last Post: 06-30-2005, 10:59 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts