| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2726 人关注过本帖
标题:关于stract使用的问题
只看楼主 加入收藏
书生牛犊
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:星夜征程
等 级:贵宾
威 望:10
帖 子:1101
专家分:5265
注 册:2015-10-27
结帖率:93.75%
收藏
 问题点数:0 回复次数:1 
关于stract使用的问题

程序代码:
#include <iostream>
#include <fstream>
#include <cstring>
using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main()
{
    ifstream infile;
    ofstream outfile;
    char name[20];
    char c;
    cout<<"please entra filename"<<endl;
    cin>>name;
    infile.open(name);
    if(!infile)
    {
        cout<<"failure"<<endl;
        exit(1);
    }
    cout<<"start copy"<<endl;
    stract(name,"copyfile");
    outfile.open(name);
    if(!outfile)
    {
        cout<<"can not copy"<<endl;
        exit(1);
    }
    while(!outfile.eof())
    {
        infile.get(c);
        cout<<c;
        }
    cout<<endl;
    infile.close();
    outfile.close();       

    return 0;
}
23    27    E:\CPP\数据结构\test.cpp    [Error] 'stract' was not declared in this scope

stract没定义应该是头文件的原因吧,但是我在头文件定义了cstring,这个相当于string.h

.

2016-08-12 16:35
书生牛犊
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:星夜征程
等 级:贵宾
威 望:10
帖 子:1101
专家分:5265
注 册:2015-10-27
收藏
得分:0 
已解决,是函数名拼写错了


strcat


[此贴子已经被作者于2016-8-12 16:50编辑过]


φ(゜▽゜*)♪
2016-08-12 16:45
快速回复:关于stract使用的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.012315 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved