易截截图软件、单文件、免安装、纯绿色、仅160KB

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");
}


相关文档:

用c实现背包问题(贪心)

好久以前做的一个程序,贪心策略实现背包问题,c实现。
总结在这里,以备以后和别人查找。
//背包问题
#include "stdio.h"
#define MAX 10
void main()
{
 int w[MAX]={0,10,130,15,60,25};      //存放质量
 int v[MAX]={0,30,5,10,20,25};   //存放价值
 flo ......

C preprocessor

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 ......

strassen in c language.

#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])
......

C' Fragment

把输入的一串字符转成数组,转成链表,然后删去其中指定的字符,在尾部添加一个字符。
(程序还不完善,没有对输错的情况进行处理,,暂时先这样吧。。= =。)
#include<stdio.h>
#include<malloc.h>
#define LEN sizeof(struct link)
struct link
{
char ch;
struct link *next;
}*string;
char a ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号