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...
Type: Posts; User: JordanWatson
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...
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...
Writing the simple program made me realise where I went wrong, ended up being a problem with global variables
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...
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
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...
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'...
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
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...");...
Yeah the 'alphabet' array in the code goes from a - z, A - Z, 0 - 9 which would fill the allocated memory
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);...
If you want a simpler way to do it you can use 'pow(x,y)' in <math.h> which is x^y
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...
I shall leave the password part out of the code, thanks for the help
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...
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...
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...
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...
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...
No just thought someone might know on here, i'll go find a java forum.
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...
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
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...
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...
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,...