If anyone can please tell, I need a little info on addons and patches.
suppose that you want to add some extra features to your favorite directx based game. patches normally published by original...
Type: Posts; User: mass
If anyone can please tell, I need a little info on addons and patches.
suppose that you want to add some extra features to your favorite directx based game. patches normally published by original...
Spaces and tabs were changed when I copied my code to the forum, it is and were easy to read in my editor.
Here is a new version and I hope this time it will be easy to read.
...
I do not know why I could not post the code sorted and looking good, I just copied it from the source file then I tried to sort. Sorry about that and thanks for helping I have to work on it to...
I want to write a function that takes two character array parameters, say string1
and string2. Both string1 and string2 contain unknown number of
characters terminated by ’ !’. My function will...
that was my scanf I think
ok that was just an idea...
you can use rand() function which is included in <stdlib.h> library and create a random number using that function.
x=(rand()%5)+1; //creates a random number between 1-5
for each number you...
when I changed "getchar()" with a "getch()" or "scanf("%d");" your program waited after printing the result
Youre right about scanfs and my way of printing strings. Maybe I should blame my compiler there were no errors and when I erase the & and the column part of my multi arrays the program worked as...
the code is taken from this site and the link is,
http://www.cprogramming.com/fod/isdigit.html
If youre talking about cin>> and cout>> I just wanted to show the function did not look if its written...
after your suggestions and my failure with the malloc() function, I have modified my code again and here is the last version of it. I am posting this code because even my compiler did not encountered...
you can use isdigit() function if I am not wrong it should be included in <ctype.h> as quzah said above.
//Example reads in a character and checks to see if it is a digit
#include <cctype>...
you should modify your code as:
#include <stdio.h>
#include <stdlib.h>// not necessary here (no use of any function included in this library)
int main(void)//main function takes no...
maybe you should put an argument into while like
while(x!=EOF){
.
.
.
}
I do not know but maybe this can help, sorry if not..
1)In the last reply that Salem posted, he showed me how to deallocate and I will do that from now on, thanks.
2)I read the FAQ and changed the prototype as "int main(void)", thanks.
3)As you said...
I have modified silk.odyssey's code a bit and finally I made the program work as I wanted. Before posting this thread, I worked for hours to compile this program without sizeof and malloc functions....
I did not have time to try the code above if it is working but the point is that helped me with my problem with their point of view. Also for anyone to know, my program was to be written in C not...
citizen is right and also for longer codes your program will work more efficiently,even faster and your code will look more simple with that kind of simplizations:)
if I were you I would put a...
I really really appreciate your work and help, I am embarassed to ask a question like this easy. It makes me feel I have a long way to come where you are, thanks again:)
I really appreciate your fast answer. I already know how to set up a 2D array but did not know that I can store strings into each row of it. Thank you so much.:)
After a few hours looking to my code and thinking I realised that I was totally stuck and could not find any way to solve my problem in my mind. The problem is shortly;
I wanna take a certain number...