Страница 1 из 1

Исправьт ошибку в функции

Добавлено: 24 ноя 2010, 19:05
Lotles
Помогите тут

Код: Выделить всё

      #include "stdafx.h"
      #include <conio.h>
      using namespace std;
	  char* new_str=new char[50];
	  char* copy(){
		  char ch;
		  do{
		  ch=getchar();
		  for(int i=0;ch!=10;i++)
		  new_str[i]=ch;
		  while(ch!=10);
	  }
		  return new_str;
	  }
	  void main(){
		  copy();
	  }


Re: Исправьт ошибку в функции

Добавлено: 24 ноя 2010, 21:18
Arioch
а в чем ошибка?
добавь include <stdio.h>