sourcecode
دوشنبه 10 اسفند 1394, 09:21 صبح
کد زیر خطایی منطقی نداره ولی اجرا نمیشه !؟ نمیدونم مشکلم از چیه ؟
#include "stdafx.h"
#include <iostream>
using namespace std;
void copy(char *a, char const *b)
{
for (; (*a = *b) != NULL; a++, b++)
{
cout « *a « " ";
}
}
int main()
{
char *a = "ABCDE";
char *b = "abcde";
copy(a, b);
cout « endl;
system("pause");
}
#include "stdafx.h"
#include <iostream>
using namespace std;
void copy(char *a, char const *b)
{
for (; (*a = *b) != NULL; a++, b++)
{
cout « *a « " ";
}
}
int main()
{
char *a = "ABCDE";
char *b = "abcde";
copy(a, b);
cout « endl;
system("pause");
}