So it works with a loop of smaller amounts? It could be anything really. Is the file opened and closed correctly?
Type: Posts; User: esbo
So it works with a loop of smaller amounts? It could be anything really. Is the file opened and closed correctly?
printf("\nUSD %.2f %.2f %.2f %.2f %.2f %.2f %.2f\n",inputUSD,inputUSD_CAD,inputUSD_EUR,inputUSD_HKD,inputUSD_BPS,inputUSD_MEP,inputUSD_INR);
printf("\nCAD %.2f %.2f %.2f %.2f %.2f %.2f %.2f\n");
...
Jesus was almost certainty not born on Dec 31 nor Dec 25, or in the year 0.
4-6 BC is more likely and probably in September.
What seemed to happen was it would not move the file pointer past the 0 however it would read past it up the the \n and copy that into
my string buffer but the file pointer would remain pointing to...
And you could maybe fire it at the light bulb to switch it off.
You would get through a lot of bulbs that way though.
Thanks but I was using fscanf at the time and this seemed to fix it.
I just read in the 00.
if ( strncmp(tmx,"#Game ",6) !=0) {
if (rn==0) {rn=fscanf(game_file_ptr,"%d",duffint);...
Yes maybe in future I will use fgets or whatever, but gets(string) is pretty easy to remember and simple to use.
I would say in reality a bug from too much input is going to be pretty easy to...
Finally seems to be getting to grips with this program after 6 days!!
Seems the main problem is I ported the program over from a site which had one text file per game where as for the new site all...
It's not going to crash though is it? I am not going to declare a small buffer and then over fill it.
Even if I did he cause of the crash would be obvious.
Yes!! It really is two much work!!
it is three time the amount of work!!
So if I follow your rules I will be 3 times less productive - so no thanks I am happy doing it my way.
I don't want to...
I am not suggesting it to others, I just do not make pointless work for myself just for the sake of it.
If I am just doing some small test program for my self I do not treat it is as if I was...
However we only build houses strong enough to for an earthquake in earthquake zones!!!
Well I would not have a problem using it really not unless I was writing a under interface for someone's life support system,
if my program to swop two strings crashed it's not the end of the world....
I think you can use
char gets (char *str)
char x[STR_MAX] = {'\0'};
gets(x);
Sorry I am not sure I never do that kind of stuff!!
EXIT_SUCCESS is probably defined as zero, you can check with a printf"%d",EXIT_SUCCESS);
I think main is an int by default but I am not sure,...
Sorry I am not sure I never do that kind of stuff!!
EXIT_SUCCESS is probably defined as zero, you can check with a printf"%d",EXIT_SUCCESS);
I think main is an int by default but I am not sure,...
Only joking!! :) I have done far more stupid thing in C I can assure you!!!
Although I have done quite a lot of things in C programming I am still unsure of some of the basics because I was never...
Yes that looks fine to me. Before you just declared pointers, this time declared memory space that can be copied to.
also why use %2s? that only prints 2 character, use just %s.
Read my updated post. I am not sure what you want to do, you can effectively do a copy by changing what the pointers point to.
That is more efficient than moving the whole string.
It's like...
I think you are declaring your strings as fixed constants not variables.
You will do better with for example
char a[20]="whatever";
(if that compiles lol)
You see 'a' is now space for a...
I wonder if it is possible to to via the proxy serve back to your own computer and get the address that way somehow?
Just a thought really.
Bit beyond me to do I think, but I guess you could...
Oh well it still has a problem on the big test but that should be easier to sort out now it does not crash and works on less test data.
Well at long long last I think I may have cracked it!!
As I had kind of suspected the problem seems to have been caused
by blank lines which fscanf (which reads the file) skips over.
This...
could the switch case statement be used?
(3 mins too late lol)