You havn't looked very hard. Borland, DGJPP(which uses gcc for windows/dos programs), MSVC++, and a few others all have options you can flag to get full ANSI Compliance.... it is only as simple as...
Type: Posts; User: Agrajag
You havn't looked very hard. Borland, DGJPP(which uses gcc for windows/dos programs), MSVC++, and a few others all have options you can flag to get full ANSI Compliance.... it is only as simple as...
I meant strictly conforming... anyways I said that it wasn't the easiest or necessarily the desired method of approach, I was only listing it amoung the options. Good point though...
No worries :D
Make sure you remember to check the return value of fopen() which returns NULL if the file cannot be opened. As far as I have noticed the best way to do it is like the others said, fread() and...
When using classes you have to allocate them with the new keyword or the constructor is not called and you have to delete them not free them or the deconstructor is not called.
Also I wouldn't begin...
Um... I don't think I missed any point. I wasn't trying to prove or disprove anyone, I was just posting what the standard said about the functions to clear up and misconceptions people had about...
Oh dear CeeCee, now I have to change my quote :p
I didn't really read this post that much, so if what I say has already been said sorry. If by deleting a pointer you mean freeing the memory that...
7.14.3.1 The calloc function
Synopsis
[#1]
#include <stdlib.h>
void *calloc(size_t nmemb, size_t size);
Description
It isn't portable so you will have to check your compiler's documentation, but you can use spawn() or execl() to spawn a child process or just run another program then exit... it is a little lengthy...
Hmm... C99 is hardly a "basic definition." It defines the whole C language. It dictates how C acts and how compilers should act. C99 is ANSI C, so I find it strange that you say C99 or ANSI C. ...
Hmm... I never knew that only linux programmers knew how to compile source code. How do we windows users ever manage?
:rolleyes:
Although it is not portable C your compiler may support the findfirst() and findnext() function. Look in your compiler documentation for examples of usage... it would make things alot easier than...
There is no C routine to do this, but you could /easily/ write your own....
If you don't like the newline at the end of your fgets() aquired strings here is a function to handle them
int remNL(char *s)
{
char *p;
p=strchr(s, '\n');
if(p==NULL)
{
...
To Quzah:
I wasn't trying to explain anything to /you/ multiple times, I meant to say that I was trying to explain it to him and so were you, not that I was trying to explain it to you and him. ...
beely while system("cls") may work in dos or windows, linux uses the command clear, so cls will not work in linux. Also system takes a very long time to call, and it would be significantly faster to...
Another way to jump would be to use longjmp(), at least then you have to include the jumping header file, thus warning anyone using your code that there are jumps. It is a little messier though and...
MD5 0wnz j00
also don't use simple substitution ciphers for reasons that won't fit in this board., Also don't use simple xor encryption.... *shudders*
ARGH! You should be slapped! void main(void)??! That blinds me. Not only is this horrible C, but any self-respecting ANSI compliant C++ compiler will not allow you to compile this AT ALL! (Not VC++...
It is compiler specific, some don't include it at all. Not only is the asm keyword compiler specific, asm is platform specific. Not a good thing for portable programs.
Hey I can solve the whole thing with only 1 function.
char *fgets(char *buf, size_t len, FILE *stream);
e.g.
fgets(myarray, sizeof myarray, stdin);
doesn't leave the \n character in the...
Nick I have never heard that, but it makes a little sense. Do you have a reference to prove that though?
And omakoo you are missing the point entirely, but I will give it a rest because I have...
There is no way in ANSI C to clear the screen, because it would be horrible for ANSI to assume that the computer you are compiling C for even has a screen. Just think about it... how many mainframes...
It is perfectly legal to use goto, and in some situations it may be desired. I don't use it for 2 reasons:
1.) I like to think of better ways to do things than spaghetti code. It I wanted that I...
I didn't read past void main() :eek:
1.) Why does AccessGranted() return void? How is the rest of your program to know that access was granted? :rolleyes:
2.) You should be slapped for using...