It might be easier for you if you add a function to print n characters
void print_char( int n, char ch);
now in this function do a loop to print ch n times; then all you will have to do is call...
Type: Posts; User: jimtuv
It might be easier for you if you add a function to print n characters
void print_char( int n, char ch);
now in this function do a loop to print ch n times; then all you will have to do is call...
This may explain why you should be using
int main (void){
//your program goes here
return 0;
That explains alot. I kinda figured it might be VS. Your right that scanf can be dangerous, its because the input can exceed the size of the array it is being put into. MS added scanf_s so not all...
beyond the very dangerous gets();
or the use of fflush(stdin);
both really bad ideas
you should get errors on compiling this. scanf_s is an undefined reference. I think you ment to say...
Since Blender so heavily relies on Python I will definitely learn that for sure. Here is a hand study I drew a few weeks ago.
http://i40.photobucket.com/albums/e210/jimtuv/Handstudy.jpg
I...
I forgot to say thank you for the links. I had already found the first GTK+2.0 Tutorial. That is where I got the info to build the above code. The other two I haven't seen yet but will dig through...
you should use
int main (void)
and at the bottom
I think you are thinking of
(*foo).x=12
see the dot . is evaluated first before *. So to force the dereference to occur first you add the parenthesis. This is exactly the same as saying
I do definitely understand that Linux has many desktop environments. Gnome, KDE, Xterm and many more even one for kids Sugar. I think If I were to develop apps for KDE I would most likely go either...
I will definitely research "model view controller". From the quick scan I did at Wikipedia it sounds like a very good idea indeed.
I made my first pop up window. What I learned from it is; always...
You should get an error here
get_name (person , 5);
get_name doesn't have that many parameters.
void get_name (struct EMPLOYEE person []);
The problem in all of this is that if your premise is not true then all the conclusions based upon that premise are also invalid. One sign of a bad premise is a constantly changing conclusion. Maybe...
This is legal
int x;
x = 'c';
printf("%d = x\n",x);
I kinda figured C++ may come in here soon so I already picked up a book from the library. I also am exploring Ruby and Python as well. It's funny a few weeks ago I didn't have a clue about any...
I have written quite a number of console programs now and wondered at what point in learning C is it beneficial to begin to learn to make a GUI.
So far I have studied
Algorithms
Variables...
Didn't know if this will help but I made a couple changes to MK27's example to show exactly what the memory addresses look like and how subtracting response from p gets the index number.
...
Don't feel bad passing function parameters can be a bit tricky. I am new as well and have to really think carefully what is being passed and how. I found this link to be helpful
Passing Arguments...
That was a silly mistake. I don't need an array of char pointers there it was a typo didn't even realize I did it. Must have done that a when I changed it to an array a couple days ago. I was...
Spent some time tonight playing with the code. I added a index array of pointers then pointed them to the struct and did a swap on just the pointers in the array leaving the struct unaffected yet...
Wouldn't this be true of most any function I were to use?? I mean when I was studying user input and learning to use fgets I needed to be sure to send the correct size to it. scanf can be a disaster...
This is another area I have rethought. It would be better to shift the data down over the "deleted" element rather then just putting in values out of range. So you would copy the next element on to...
Wow you were fast. I was just about to edit this out. LOL
Just thinking how someone would set up the function for deleting a node. If it should be done recursively or iteratively.
yep no difference there but that's not what you had before. This is the way you put it first.
So I was speaking of breaking the height into feet and inches.
You can't delete an element...
Ok only had a little time to code today so I fixed the lack of an initializing function I set up
void Init_person(personal_info *client, char name[NAME_SIZE],
int feet, double...
Glad you found that. In the future a look a the faq or google search may get you the answer without starting three threads with the same question
Cprogramming.com FAQ