thanks very much! that was really helpful..
Type: Posts; User: nyekknyakk
thanks very much! that was really helpful..
hi, everyone! i'm currently working on a code that delays a text in c.
the code is something like this:
char text1[SIZE][SIZE] = {"The", "quick", "brown", "fox", "jumps", "over", "the", "lazy",...
come on guys, i didn't copy the whole code so that the important parts will be the only things here.. will you please answer the question?
oh.. this is just part of the program! as i've said earlier, it already compiled.. the problem is when i run the program.. it always crashes when it goes from the main function to the check function!...
int main() {
char text1[SIZE] = {"The quick brown fox jumps over the lazy dog."};
printf("The quick brown fox jumps over the lazy dog\n");
printf("Input the text above:\n");
gets(input);...
oh.. the load function won't load its contents to the program!
for example, if i use the viewall function once i've restarted the program after saving a database, it won't show anything eventhough...
i made a database program in c and so far, all functions are working(add data, remove data, modify data, view a data, view all data, and save database into a file) except for loading the saved...
hi! how will i allocate memory?
is this the right way?
(struct person *)malloc(sizeof(dB)); //is this right?
hello, everyone! i have a problem about my code. it automatically crashes after a user typed an info, ie, name, into the program. is there something wrong with the way i get information from the...
but does it still works the same?
and has the same syntax?
How does it differ from gets and scanf?
oh, that's where it came from. but how can i fix it?
what do you mean by that? which part did it went wrong?
hi, everyone!
please take a look at my program:
int main()
{
while(1)
{
printf("\n>> ");
Hi, so how about the number of rows and columns? it is also defined by the user, too. is it not needed to be in the parameters anymore?
and also what are the return values for each of the functions?...
hi, everyone!
i've tried using asking for help about using strtok but i wasn't able to get an answer. i will now try to use memcpy..
but you can still help me with using strtok:...
Hi! So you're saying that i don't need to return a value anymore?
What if my program runs like this:
First, it asks the user for the matrices, then goes adds the matrices, then displays them.
All...
Hi, New Ink!
I can't figure out how to change the contents of my array after processing a command.
But I've already done your suggestions, it still has the same problem. It still crashes like...
right. i'm really sorry about this. because after posting my first question here, i didn't see the thread so i made a new one. i was going to delete it but i don't know how.
i'm sorry.
you mean to change char* cmd_words[50] to char cmd_words[50][50]?
ms. laserlight told me not to use global variables so if i combine your suggestions it will look like this:
#include <stdio.h>...
actually, ms. laserlight, i became more confused of the terms you used. i'm only on my first year at learning c, and still at 3rd year high school.
i don't know what it means to change command_words...
there has been a lot of changes in my program, recently. i'm now working on a program which lets the user make and display a matrix.
#include <stdio.h>
#include <string.h>
void make_mat();...
Hi, new ink!
can you give an example on how to do it properly? i've got no idea how to avoid tokenizing the string but i know i must do it because i have to seperate the string into words.
hello, everyone!
i am working on a program which lets the user make and display a matrix. so far, i'm still on the making a matrix part. but everytime i run the program, after i typed the numbers....
qwertylurker, i already fixed that problem. i seem to have a new problem now:
please read my thread again, it has been edited!