try this:
scanf("%c", &locationtosave)
Type: Posts; User: DLR
try this:
scanf("%c", &locationtosave)
can't I use int year?
this is what I have so far. I have the printf statement at the bottom just to see if it works (which it doesn't). I can't figure out any way to fix it. I also get a warning...
oh yeah duh :rolleyes:
yeah i caught that
ok thanks
Right now I'm trying to read in a buncho f data from the text file "Top_Movies.txt" and putting the data into a structure. This is what I have so far. Now I know it isn't goign to work so I'm not...
I want my program to open up a text file....in visual c++ do i have to put the text file in 'source files' 'header files' or 'resource files' folder? Also when i save the text file that i'm going to...
well if anybody gives a damn i figured it out:
void swoopinfo(char nameptr [], int i, char *majorptr)
{
char plezwork; //it worked!
char dummy;
printf("Enter seed #%d's...
from what I can tell the function is getting the char for major correctly...so I think that it's not sending it back to main correctly.
ok I'll try that. I apologize for not being a good programmer like yourself.
it's still not working right. It always prints the persons major as Und. I've tried everything I can think of. Right now it works best with
for (i=0;i<8;i++)
{
...
oh duh...yeah i'm surprised it worked too. thanks a lot!
Here's what I have. It should work from what I can tell, but it has a little bit of a problem printing the bracket. Also there's a few warning messages, which I am pretty sure are because I'm...
haha well I finally figured out why i kept getting 56 errors.....the printBracket calls for Player with a capital P, I had the Player structure as player.
oh yeah i guess that makes sense....I'm just going to get ride of the typedef
cool thanks
...are you sure that you're not supposed to have
void struct printBracket(Player x []); ?
Here's the assignment:
"You must create a structure called Player, that contains each of the following variables:
- A string called name that has a maximum size of 10 characters.
- A character...
ok well this is what i ahve so far
void parseString( char *string, int *lines_ptr, int *words_ptr, int *chars_ptr )
{
int i;
int j;
int k;
here's what i got for counting lines
for(j=0; string[j] !='\0'; ++j)
{
if (string[j] == '\n')
{
*lines_ptr +=2;
}
thanks dave_sinkula once i somehow get started i get the hang of it
we'll see how it goes from here
ok now i'm trying to figure out how to make it count the number of characters
oh duh ^
that's why nothign was working
ok so the assignment is for the user to enter some ........ and then the program prints it out, then pritns the number of characters, words, lines, etc. I'm trying to modify the first function...
apparently last night i changed it so you can enter negative numbers, but -1 to quit.
if (a[i] == -1)
{
i = 25;
}
i'm not too concerned about changing that right now, I just need to finish the assignment. I've added a couple things, but it still needs some more.
what i still have to do is :
Print out...