Nice post 00Sven...
The other thing I didn't understand in the original post is why the <math.h> file was needed. I didn't see any calculations or math functions that were out of the ordinary.
...
Type: Posts; User: TCB
Nice post 00Sven...
The other thing I didn't understand in the original post is why the <math.h> file was needed. I didn't see any calculations or math functions that were out of the ordinary.
...
Uninstall Dev C++ and reinstall it. I started out with that IDE and never recall having to do *anything* with a path outside of the IDE. In fact, I have been using it for several months, and don't...
Bubba,
Good tip...
I just learned about function prototypes last week. I guess I knew about them for quite some time, but didn't know what they really were. But I can see how they would really...
I don't know the code, but can't you read the string until char = '.' - 1 (one char short of the . char)? Maybe use strcpy() and write that to a buffer of sorts, and there's your first string. Then...
LMAO...I have that book. I always thought that "Teach yourself C in 21 WEEKS" would have been a more appropriate title.
21 days? I think not.
TB
Thanks.
And thanks for the link--I had NOT seen it, and appreciate it very much.
TB
Thanks OnionKnight...
I was responding to another post when you posted. That clarified it for me.
TB
Ok...so passing a value to a function basically negates the need to declare any such variable in that receiving function--even though that might be the first use of 'a' or whatever else you tell it...
Guys,
I have a question or two about the following code segment that I hope someone will answer. This was part of a source code file provided on the CD, so I did not pick the variables.
...
I am using the MinGW application, so if you are not then please disregard the following.
I don't know whether you have done this or not but, go into the control panel and click on the 'system'...
Salem,
Re: fflush(stdin);
I got that from the C-programming course I have been taking; all the projects seem to use the fflush() function to flush the newline character prior to using scanf()...
Well, I am just learning C myself and do not know much at all about pointers. But I do know a little bit about char arrays, and just figured out that the problem with your code had something to do...
#include <stdio.h>
main()
{
char days[7][20];
int day;
printf("\nPlease enter the days of the week: \n\n");
for(day=0; day<7; ++day)
{
Thank you Dante...nice link!
TB
It works great if you only enter 1, 2 or 3 characters in for each day. But as soon as you enter four or more characters things go haywire.
Interesting.
EDIT: Here you go...make it a...
// File:
//
// Program Details:
//
// Author:
//
// Date:
//
I used the C source code above; neither example compiles. And I think the file I used was simply in the file path File:New:Source File (Ctrl+N). I don't think I actually created a project because I...
As Dante mentioned above, if you open a console project and use them, it works just fine. But I wasn't using the console project until now. So I guess I need to go investigate the different project...
No, that's not the problem...lol.
I edited the above code incorrectly, and forgot to close the comments. My mistake. I assure you, it was correct in my source code before I posted it, then I...
I found this book:
"C Programming," by Mike McGrath, for $10 at Barnes & Noble. While I have several other C books, I find myself finding quick answers to those little questions that pop up. It...
//
/* Course_Project.c
*
* Program to maintain a database of CDs for a record store.
* This is the Course Project for the C Programming Course
*
*
* by snidely...
I have been trying to learn C via self-study. I have been reading this forum for a couple months now and have purchased a couple books on C, as well as a training course on CD. I have Dev C++...