or if they actually fill the 7 arrays that are counted it prints.
Type: Posts; User: mattz
or if they actually fill the 7 arrays that are counted it prints.
QUZAH,
Any ideas on how to fix this program I posted earlier? Want to have the user type "QUIT" to exit and then print out the string arrays.
Mattz
Here is my first attempt. Modified it a bit and it seems to work..but noticed its probably not in the right place as it should print out the contents of buffer when I type QUIT instead of just...
strupr(string);
if (!strcmp("END", string))
/*** ETC ***/
Does not seem to work...FYI
Mattz
Okay figured out answer through some searches and some local help:
#include <stdio.h>
#include <time.h>
int main ( ) {
time_t t;
clock_t start, end;
long i;
long count;
#include <stdio.h>
#include <time.h>
int main ( ) {
time_t t;
clock_t start, end;
long i;
long count;
count = 1000000;
Both of the above examples caused some errors when run for me. Thanks anyway. Is there a way to display milliseconds vs just seconds....make it more accurate?
Matt
Can someone take a look and verify I am getting the proper results?
#include <stdio.h>
#include <time.h>
int main ( ) {
clock_t start, end;
int i;
long count;
Wow...you are good :)
Thanks for help.
Thanks to all,
For those interested here is the answer:
#include <stdio.h>
int blanks ( char* a, int num );
Here is what I HAVE..I did READ btw.
#include <stdio.h>
int blanks ( char* a, int num );
Write a function that initializes all elements of
a character array to blanks. The function should take
two arguments. The first is a pointer to a character
array. The second is...
Thanks,
This does help some. I just need to figure out how to get that sscanf to work with fgets etc.
Mattz
Trying to convert this function from its current form (see attached attempt) , to a function that uses one line and sscanf to readin users text and inputs (bold, underlined,italics, textsize) and...
That sscanf example does not quite work, for some reason.
Thanks Quzah
This should get me started :)
Mattz
Hello,
I need to figure out how to validate the contents of a char buffer that contains a string of text. Any help and examples would be appreciated.
Each line of input will have the following...
Disregard...will just leave in main
Hello, all
Been trying to make this a bit cleaner and wanted to take the majority of whats in main and make it a function that is called by Main. I have tried various function formats void, int...
Excellent...understand now.
Thanks
Thanks very much. It works great. Could you help me understand what you have done here:
//you declare another char array "buff2" with the size [BUFSIZ].
char buff2[BUFSIZ]
/// assign the...
Hello,
First thanks to all who have helped me get to this point.
I have a general question on how to tackle this section of problem. I need to read in a response from user (from 1 to 7) to...
Okay...finally...
if ( buff[0] == '&' )
break;
Thanks of help Mike..
Matt
Oops ..not the answer...only does it once through..second time does not work.
Did some reading, here is the answer.
if ( buff[i] == '&' ) break;
Matt