So you're saying that my textbook wasn't really updated (new edition 2002 :D and they didn't correct the code in the book... OK, thanks for explanation!
Type: Posts; User: Nutka
So you're saying that my textbook wasn't really updated (new edition 2002 :D and they didn't correct the code in the book... OK, thanks for explanation!
This is an example from my textbook. I was studying for an exam and after compiling a program I got surprising results. The book didn't mention it at all. Can anybody explain what happened?
The...
Thanks, Salem, for explanation, and everybody else too for your input.
It seems to me there was a misunderstanding at the beginning. I tried to say that the array is [3][4] and that it is the...
Thanks to both of you, I need to do some more extensive reading ion the subject and be more careful too :D
Thanks again!
You see, I am a total beginner, thrown into a deep sea trying to swim...
Let me then explain what the program is supposed to do:
user enters all the integers to fill in an array num[3][4] (these...
I tried to look for an answer using search the forum, but it hasn't been working for the last couple of days, unfortunately... :(
Maybe someone could point out where is the problem with this two...
I'm still working on it :D but at least now it is not in continuous loop! Thanks, Salem!
Hi...
I worked on the code, finished it. Unfortunately the program now stays in loop infinitely, and as far as I can notice, it doesn't display the data. I think I messed up with num and course, but...
Ok, I'll do that, I always seem to be a little afraid to use functions for some reason :D but I'm going to implement them right now to make it all look neat.
And I'll get to write more of the code...
Oh, thanks, I understand this \0 at the end of the string problem, I fixed it now.
That's a surprise to me, I thought only \n can cause the problem... so I thought it's OK.
I was...
I've been trying to write this for quite a while, and still have a lot of problems. I know it is still a mess, can't figure out a few computations (real headache), but at the moment the worst problem...
Sorry, it's just a microsoft example ;)
It's good to take a look in your compiler's help files first. Can't help you too much but I found a short example code which aims at explaining how it works and how to write another code with strtok....
OOOOO! :D Now I noticed! Thanks .... Something as small as a blank space here and there creates so many problems...
Sorry, I thought I copied everything...
What about now?
int main()
{
char noun[] = "bank cat mouse car lady";
char verb[] = "wetted kissed swum walked skipped";
char preposition[] =...
I'm working on another program, which creates sentences from randomly chosen words.... I just started and have this little part of code, and it just crashes the whole thing... Cannot find the reason...
Oh. I finally know where the problem wasis. It's not the string array. It is the variables which stay after one run of the program. If I do not exit and re-execute the program they will be adding new...
I did try to fill the new array with '\0', but it still doesn't work. The new string is located at the beginningof the array, but the older string is still right after the new one....
What is going...
Ok, I can do that. Thanks. Actually it was the first thing I thought of before I started writing this... I can change this, no problem.
Still, what should I do with the inputarray, which is filled...
i was just wondering how to fix my program... If user wants to enter another string (e.g. shorter one), some characters are left in the array, and the count of vowels, consonants and white spaces is...
I'm not supposed to use anything from <ctype.h>, so... toupper would be out of question anyway...
But thanks.
Thanks a lot, every single time I'm learning something new here... :cool:
I just started writing this program... There will be more code inside main, but it already doesn't work as I expected it to...
What it does is: it runs correctly once, and then after execution it...
Thanks! I'll do that...
I have 2 questions.
The first one seems very simple and trivial, however I still need explanation why it is happening like this.
When I declare and initialize local vars I try to put them in a...