How to compile this C Code in Dev-C++??
From: JS (dsa._at_asdf.com)
Date: 11/18/04
- Next message: Rich: "Return or Not?"
- Previous message: Verne: "Re: What are the benefits?"
- Next in thread: Rich: "Re: How to compile this C Code in Dev-C++??"
- Reply: Rich: "Re: How to compile this C Code in Dev-C++??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 18 Nov 2004 18:23:24 +0100
I have done the following: New Project -> Console Application -> C Project.
Then I get the following text:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
But where do I write my own C code? I have written the following code:
void c(unsigned int n) {
while (n > 1)
if ((n & 1) == 0)
n = n/2;
else
n = 3 * n + 1;
}
But where should I put it and how do I compile it?
Js
- Next message: Rich: "Return or Not?"
- Previous message: Verne: "Re: What are the benefits?"
- Next in thread: Rich: "Re: How to compile this C Code in Dev-C++??"
- Reply: Rich: "Re: How to compile this C Code in Dev-C++??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|