在Dev.c++中,为何这样应用自定义头文件会报错
  • 板块学术版
  • 楼主yyb18660335329
  • 当前回复19
  • 已保存回复19
  • 发布时间2023/1/16 16:52
  • 上次更新2023/10/24 03:59:23
查看原帖
在Dev.c++中,为何这样应用自定义头文件会报错
749958
yyb18660335329楼主2023/1/16 16:52

求解:为什么这样写会报错↓代码

自定义头文件代码:

#include<bits/stdc++.h>
using namespace std;
//nums:
long long randing_out(long long cs,long long a,long long b,bool outway)
{
	srand((unsigned)time(NULL));
	for(int i=1;i<=cs;i++)
	{
		if(outway)
		{
			cout<<rand()%b+a<<endl;
		}
		else
		{
			cout<<rand()%b+a<<" ";
		}
	}
}
bool cmp(long long a,long long b)
{
	return a<b;
}
//string:
string kill(string a,int n)
{
	char b[a.size()+1];
	for(int i=0;i<=a.size();i++)
	{
		if(i!=n)
		{
			b[i]=a[i];
		}
	}
	return b;
	
}
string putfront(string a,string b)
{
	string ab[2];
	ab[1]=a;
	ab[2]=b;
	return ab[1],ab[2];
}
int charnum(char a)
{
	return a+0;
}
int main(){}

主函数代码:

#include<bits/stdc++.h>
#include"viod_runbox"
using namespace std;
int main()
{
	char a;
	cin>>a;
	cout<<chatnum(a);
}

报错信息: C:\Users\Administrator\Desktop\c++.cpp [Error] viod_runbox: No such file or directory compilation terminated.

在线求解

2023/1/16 16:52
加载中...