
file-new-file... 选择C/C++header
选择路径 命名头文件
完成后的界面
3.添加源文件
file-new-file... 选择C/C++source
选择路径 命名源文件
完成后的界面
game.h 代码
#include <iostream>
using namespace std
void goAtk
game.cpp 代码
#include "game.h"
void goAtk
cout<<"LOL攻击实现"<<endl
main.cpp
#include <iostream>
#include "game.h"
using namespace std
int main
goAtk()
return 0
在工程中添加C文件,只要选到相应的目录,再选相应的文件就可以了。 添加H文件,要在C文件中添加,#include ".\xxx1\xxx2\xxx3.h"或#include "..\xxx1\xxx2\xxx3.h" ‘.’表示当前目录,‘..’表示上级目录,以main函数所在的C文件目录为准。#include<stdio.h>#include<stdlib.h>
#include<string.h>
int main()
{ char s[300]="copy ",f1[100],f2[100],f3[100]
printf("File1 name:")
scanf("%s",f1)
printf("File2 name:")
scanf("%s",f2)
printf("Dest File name:")
scanf("%s",f3)
strcat(s,f1)
strcat(s,"/b+")
strcat(s,f2)
strcat(s,"/b ")
strcat(s,f3)
puts(s)
system(s)
return 0
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)