Watcom C compiler - Wikipedia, the free encyclopedia
Type: Posts; User: Harbinger
Watcom C compiler - Wikipedia, the free encyclopedia
> whts the code for this program
I'm sure your effort so far will get a well deserved 'F'
> I am trying to convert a complex c program to c++ to make it easier to maintain.
rewrite it then.
Unless you count a 'cast-fest' which results from your quick hack as being more maintainable.
...
Geez, ever heard of a search feature?
Or do you want a complete spoon-fed answer because you're too helpless to do any actual work yourself?
Nevermind - don't bother answering unless you have...
It certainly isn't possible without knowing which OS and compiler is being used...
> Hi, i have had problems using a perl interpreter in C, and i wondered if anyone had any tips.
No compiler mentioned, perhaps RTFM would help.
> Basically, ActiveState's version gives me a whole...
Yes, you screwed up.
Open the file in binary mode.
Perhaps you should learn some object oriented design as well.
Simply throwing a few unplanned classes into a program doesn't produce a well designed program which uses OOP to its best effect.
>...
Write all the perms for 2, 3 and 4 symbols, and observe the handy pattern they generate.
If you can't manage perms by hand, forget about trying to write the code.
Ooh ooh - lets play a game of guessing which OS and compiler you're using, then see if your choice of lib makes any sense whatsoever.
Not to mention the psychic abilities needed to figure out what...
Maybe put -lwininet after the object files....
void main
gets(buffer)
casting malloc....
I'm gonna puke!!!!
> lab9.c:52:file does not end in a new line
Gee, I wonder....
D'ya think going to the end of the code, pressing return and saving it would help.....
Bored now.....
int limit = sqrt ( fooo );
for (i = 0; i < limit ; i++ )
If you can't get that into your code, give it up
If you open the file in text mode (on a windows machine), then \r should be stripped when you read it, you'll only see \n and it will be added when you print a \n (\r\n appears in the file).
Yawn - another noob being taught by a lamer tutor who thinks teaching C is all about dumb tricks....
> Any reason for this?
Ask them what this does
int main ( ) {
char *buff;
fflush(stdin);
gets(buff);
}
> void main()
And 200+ posts - tsk
> -lXss -lX11 -lgdk
These go after .c files - otherwise the linker doesn't see any unresolved symbols when it gets to the libraries, therefore it doesn't think the libraries are necessary.
Well try not calling sqrt() so many times - like just ONCE before the loop, not every time within the loop.
"dynamic allocation" Showing results 1 to 25 of 369
"reading files" Showing results 1 to 25 of 500
Go figure....
Clicky Clicky, do some reading
http://www.google.co.uk/search?q=Sieve+of+Eratosthenes
Then refine the search by adding "source code"
> but I have never had any problems with it!
Ever tried simply copying a file using that technique?
Ever read the FAQ?
So I guess your prof is teaching you the compiler rather than the language. Make of that what you will, but if you think learning stuff is hard, try unlearning a bunch of half-truths and compiler...