Search:

Type: Posts; User: JordanWatson

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    616

    The code goes through all combinations of the...

    The code goes through all combinations of the alphabet array from 'a' to as mentioned previously, approximately 'ac8R', which is why i think it's something to do with memory because it works fine...
  2. Replies
    5
    Views
    616

    Memory Problem/Segmentation fault

    I'm writing a brute force algorithm to create a string that searches through all combinations of letters and numbers and compares it with another string which I declare myself however when running it...
  3. Replies
    3
    Views
    473

    Writing the simple program made me realise where...

    Writing the simple program made me realise where I went wrong, ended up being a problem with global variables
  4. Replies
    3
    Views
    473

    Problem with changing string

    I'm having a problem with changing a string in a switch statement. (There are more cases in each switch but it isn't important).

    The first switch statement works fine, however when I get to the...
  5. Replies
    1
    Views
    329

    Compiling for Windows in Xcode

    Is it possible to compile a C program in Macs Xcode to work on Windows OS? I've changed all of the Mac specific commands for Windows but it won't compile
  6. Replies
    0
    Views
    332

    Entering new shell in C Program

    Is there a way to create a new shell or terminal box within a C Program,
    something like


    char *string[MAX];
    strcpy(&string, "sh");
    system(string);

    but I want it to create a...
  7. Replies
    4
    Views
    326

    Maybe you could have a dead list instead so all...

    Maybe you could have a dead list instead so all enemies are always in use until in that list. So every time the user attacks an enemy it goes through something like:

    enemy1.health -= 'usersattack'...
  8. Replies
    2
    Views
    618

    Line 4 doesn't make sense, I think what you're...

    Line 4 doesn't make sense, I think what you're trying to do is

    a++;
    b++;
    c++;
    if(something)
    d = (a+b);
    else
    d = c;
    In line 4 you're basically saying
  9. Replies
    6
    Views
    2,766

    I thought malloc was a better way to do it, if...

    I thought malloc was a better way to do it, if you can use a string literal instead what is the point of ever using malloc?

    What would be the difference between

    strcpy(alphabet, "abcde...");...
  10. Replies
    6
    Views
    2,766

    Yeah the 'alphabet' array in the code goes from a...

    Yeah the 'alphabet' array in the code goes from a - z, A - Z, 0 - 9 which would fill the allocated memory
  11. Replies
    6
    Views
    2,766

    Problem defining global char array

    I'm trying to define a global char array but i'm running into problems when compiling. If i move the code into a function it works fine.



    char *alphabet;
    alphabet = (char*)malloc(63);...
  12. If you want a simpler way to do it you can use...

    If you want a simpler way to do it you can use 'pow(x,y)' in <math.h> which is x^y
  13. Replies
    2
    Views
    342

    No one is going to write a program for you, if...

    No one is going to write a program for you, if you aren't even going to try asking someone else to do it for you isn't going to help you learn.

    If you aren't very good you should try starting with...
  14. Replies
    6
    Views
    636

    I shall leave the password part out of the code,...

    I shall leave the password part out of the code, thanks for the help
  15. Replies
    6
    Views
    636

    It's working now thanks, I've compiled it as...

    It's working now thanks, I've compiled it as power, and put the location in .bash_profile so I can execute it, but it will only read the password from a text file when in the same directory as the...
  16. Replies
    6
    Views
    636

    Thanks for the reply, I've tried 'sudo --stdin...

    Thanks for the reply, I've tried 'sudo --stdin shutdown -h now < password.txt' however it says including the --stdin is illegal, i can get the password to be printed on the terminal but it won't let...
  17. Replies
    6
    Views
    636

    Terminal C Password Command

    I'm trying to create a command on the Mac Terminal to shutdown the computer with a command '<program name> sd', '<program name> rs' restart and '<program name> sl' sleep, instead of typing 'sudo...
  18. Replies
    3
    Views
    311

    From what I can see you are trying to determine...

    From what I can see you are trying to determine whether to do '1.enter cm' or '2.enter mm' by using the 'int a' to decide which switch to use, but you are then using the 'a' variable to be used as a...
  19. Replies
    3
    Views
    420

    C Intermediate Programming Practice

    I've been learning C for a while and I would like to think I'm an Intermediate Programmer in C, but as C isn't object oriented I'm not sure what to program other than going through exercises in...
  20. Replies
    2
    Views
    4,483

    No just thought someone might know on here, i'll...

    No just thought someone might know on here, i'll go find a java forum.
  21. Replies
    2
    Views
    4,483

    Book for Java

    I've decided to start learning Java and have been looking at this book
    Java: The Complete Reference, Ninth Edition: Amazon.co.uk: Herbert Schildt: 9780071808552: Books

    Don't really know anything...
  22. Replies
    4
    Views
    1,210

    The problem is I can't seem to get it to boot...

    The problem is I can't seem to get it to boot from startup and I can't boot find a way to boot after startup so I assume the files are only programmed to work for Windows
  23. Replies
    4
    Views
    1,210

    Linux Bootable Live CD

    I've got the book Hacking: The Art of Exploitation by Jon Erickson, the book has a live CD which provides a Linux based hacking environment, it doesn't seem to be working on Ubuntu as I think it's...
  24. Replies
    14
    Views
    12,190

    Tattoos in the programming job community?

    Does anyone have any experience with having tattoos being a programmer?

    I would assume most companies wouldn't care because they are a programmer and not a shop assistant, but is having a tattoo...
  25. Trouble returning char array by function

    I'm having trouble returning a char array by a function, here's the code
    Also I'm sorry about the bad layout it's fine in my compiler and the message box :(

    The problem is the 'reverse' function,...
Results 1 to 25 of 33
Page 1 of 2 1 2