anyone? its urgent
Type: Posts; User: duffy
anyone? its urgent
How do i get my program to end when the enter button is hit, with no input on the line?
Example:
$12345 (enter)
$24234 (enter)
$ (enter)
(program ends here.)
Hmm well it must be the tester then, coz i tried that aswell :-)
Thanks for your help tho.
Now I get this:
make: Fatal error in reader: makefile, line 20: Unexpected end of line seen
What am i doing wrong??!!!
CC=gcc
OBJS=num.o
Im getting a warning that newline is not the last character in the makefile, but there is a blank line there, so whats the problem.? Does it have to be a \n
?
I need to add a "all" rule to my make file, but ive never seen what that is before, and ive done a search but cant find anything. the all rule is meant to make it so that make all produces an...
How would i go about writing a perl script that takes a number and some text and outputs the text the number of times that was entered. How do i make it so that if a message isnt entered that it...
how do i write a csh script, that uses its first argument (a number) to specify which one of its remaining arguments to echo?
ok im sorry.
what im trying to do now is make it so that the person can enter either a number for the month, or the name of the month itself.
Like:d 23 November 2002
Am i on the right track here?
...
Thanx salem, it fixed the problem. I assumed everything to be correct in that date.c file because the teacher set it up, but apparently not :). Um my next task is:
The program reads and executes...
Now im getting a totally wrong date being outputted. current_year is saying 1970! something is still not working right but i cant figure out what it is. Also when i try to print out the month name i...
even with the pointers *. i still get the same error. Ill put all of the code so you can see it all.
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include "date.h"
#include...
Im getting an error when compiling that says "assignments makes integer from pointer without a cast". For all three assignment statements.
if (res == 0){
day = current_day;
...
Could the problem be that the date.c file i have actually included as code in the prog makes the makefile not work? can anyone please correct my makefile so that i can test my code properly. Thanx....
Any ideas with the makefile thing tho?
:confused: :confused: :confused: :confused: :confused: :confused:
Hi i need help still with my above Q, but i also need help with makefile. I need a makefile so that i can test the prog properly...
Hi again, sorry to be so annoying, but im having so much trouble with this task!
I have reverted back to an old program that i was working on for this a while ago. I am now having trouble with the...
Now that i have the prog working for input such as d23 11 2002
Output: 23 November 2002 is a Saturday.
How do i get the program to do this:
input: d 23 11
Output: 23 November 2002 is a Saturday...
its ok, i forgot to remove the getchar()
thanx :D
Its always producing the second error. Even when you enter d 23 11 2002, it does the error. The != 4 part also doesnt work...?
int main () {
int day;
int month;
...
Sorry, i do actually need more help.. i was having trouble before because i left out a file that had to be included. I got that working now. This next question is to do with the input. At the moment...
Sorry thanx for trying to help, but i got it working. Cheers.
Hi, i cant get this to work and i dont know why, its not becuase of the date.h... i do have that file in my dir.
#include <stdio.h>
#include "date.h"
char* month_name (int...
How would i define a shell alias that reports only the current time using the date command? :confused: