well this is what i got and the code compiles but and gives me the current time and then gives me an error and boots out.
{
time_t t1;
struct tm *tptr;...
Type: Posts; User: kevndale79
well this is what i got and the code compiles but and gives me the current time and then gives me an error and boots out.
{
time_t t1;
struct tm *tptr;...
thanks now it works and im trying to figure how to carry over 30 minutes to the next hour
for example 18:45 30 minutes later it says 18:75 and i want it to read 19:15.
if statement? not sure...
here is the code
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main( void )
{
It also doesnt seem to really matter what other code I program into it because all my program ends up doing is compiling and then when it is run it tells you the current time and allows input for a...
thanks for the link although I think it might be written a little over my head..
okay so the while statement starts the countdown? how would i get the program to display that the timer was set when the program was run and will go off at time 11:00pm (if program is run at 10:30)
...
It does not compile. It did until I tried to put the thirty statement in there and then kind of got stuck.
I am trying to figure out how to get C to set an alarm for 30 minutes ahead of whatever the displayed time is. I got the rough draft of displaying the system time (although it does prompt me to input...
Is fgets an appropriate substitute? My textbook constantly uses gets but everyone on this website seems to despise it.
Here is my new rough draft. It won't compile due to the toupper line so not...
My assignment is to have the user input a filename and then change that filename to all capital letters. I have no clue how to do this. Any help would be greatly appreciated. I will post the code I...
This is my first try at getting the 6th value inputted. Compiles but crashes after the first 5 values are inputted and displayed.
#include <stdio.h>
struct Oomba
{
int value;
So now my function and structure work with the input of the 5 values. The assignment me asks us to have the user input 5 values then print the results and then input one more value. I am trying to...
That part is working now THANKS! Now I am trying to create the function to print out the list of the linked list and it compiles and runs up until the point it sends the input to the function. Here...
This is what I got, I think I am getting the idea but now I am getting an error C2059 with Microsoft visual basic that says syntax error 'type' for the lines that scanf. I didnt write the display...
I was hoping to gain some understanding of what i was doing and hoping by getting an array to work that would help me figure out my multiple problems with the linked list. The linked list is what I...
Thanks for the sample program. I changed the structure to a different format (array) hoping that might alleviate some of my many problems. This program does compile but will not run.
#include...
Still working out the kinks. This gives me lots of errors, especially the storage of the values not reflecting the proper struct union type. I only wish my book was a little more helpful.
Thanks,...
Okay my assignment is to create a program that accepts a user input for 5 values and stores them in a structure and then prints those 5 values back and allows for one more value to be inputted. I...
What are my options if I would rather not have month as an array??
Thanks
I am extremely limited in my knowledge and trying to learn the best I can but what is wrong with the use of my gets statement and how do I fix the single character limit for the month variable....
This code seems to be working with the exception of my output being only the first letter of the input month. For example Jun 10 comes out via printf as J, 10. I believe the problem is in sscanf...
Made the recommended changes now it says fgets has too few arguments to call and won't compile. Thanks for your help here is the updated code.
#include <stdio.h>
void seperate(char[]);
char...
Needed some help getting this program to work correctly. The object of the program is to have a user input a string for a date and then call a function to extract that date into two variables (month,...