Visual Studio 2005创建C程序
在Visual Studio 2005中创建C程序的方法为:
1. File ->New Project -> Visual C++ -> Win32 -> Win32 Console Application,然后在下面的Name栏写上Project名称,Location栏写上文件的存放路径,点OK按钮进入Application Settings,在Addtional options中选择Empty project,点Finish按钮完成工程的创建。
2. 在visual studio 视图的右上角的Solution Explorer中,在Source Files中创建c程序,step为:右键点击Source Files,在menu中选择Add-> New Item,选择C++ File,并在下面的Name处键入first.c,location处写上程序名称和程序的位置,这里选默认即步骤1创建的工程位置,点Add按钮完成文件在Project中的添加。
3.程序写好后,先编译文件(Build-> Compile或ctrl+F7),再运行(Debug -> Start Without Debugging或ctrl+F5),就会看到所写程序的运行result.
附:1个最简单的C程序,hoho
first.c
/* 在屏幕上输出字符串 */
#include <stdio.h>
main()
{
printf("Hello,World!\n");
}
相关文档:
http://en.wikipedia.org/wiki/C_preprocessor
C preprocessor
from Wikipedia, the free encyclopedia
Jump to:navigation, search
The C preprocessor (cpp) is the preprocessor for the C programming language. In many C implementations, it is a separate program invoked by the compiler as the first part ......
#include<stdio.h>
#define N 8
void input(int n,int p[N][N])
{
int i,j;
for(i=0;i<n;i++)
{
printf("please input the %d line:\n",i+1);
for(j=0;j<n;j++)
{
scanf("%d",&p[i][j]);
}
}
}
void output(int n,int p[N][N])
......
例) 危険なコーディング
1 char cStr[256];
2 ZeroMemory(cStr, sizeof(cStr));
3 &nb ......
PHP取得成功的一个主要原因之一是她拥有大量的可用扩展。web开发者无论有何种需求,这种需求最有可能在PHP发行包里找到。PHP发行包包括支持各种数据库,图形文件格式,压缩,XML技术扩展在内的许多扩展。
扩展API的引入使PHP取得了巨大的进展,扩展API机制使PHP开发社区很容易的开发出几十种扩展。。扩展主要的思想是 ......
把输入的一串字符转成数组,转成链表,然后删去其中指定的字符,在尾部添加一个字符。
(程序还不完善,没有对输错的情况进行处理,,暂时先这样吧。。= =。)
#include<stdio.h>
#include<malloc.h>
#define LEN sizeof(struct link)
struct link
{
char ch;
struct link *next;
}*string;
char a ......