Присвоение строки указателю на символ в 64-битной ошибке

Я застрял в проблеме с назначением строки на символьный указатель. Казалось, что указатель символа принимает только первые 256 символов строки. Моя работа на 64-битной платформе. Также тот же код отлично работает для 32-битной платформы. Я не мог понять, почему только 256 символов назначаются только в переменной указателя символа в 64-битной платформе, может кто-нибудь, пожалуйста, помогите .. Заранее спасибо.

Мои тесты

const char *test2=
"Hello everyone""Please help me""my string assigning part to char pointer in a code is not working""I have been stucked on it for 3 days.""I tried lot of things""but the problem persists.""I have no idea why the code is not working"" Here comes The problem in next line...""If you get this line in the up assigning variable..yuppieee";

const char *test3="Hello everyone .Please help me my string assigning part to char pointer in a code is not working I have been stucked on it for 3 days. I tried lot of things but the problem persists. I have no idea why the code is not working  Here comes The problem in next line... If you get this line in the up assigning variable..yuppieee";

Результат в

test2 ="Hello everyonePlease help memy string assigning part to char pointer in a code is not workingI have been stucked on it for 3 days.I tried lot of thingsbut the problem persists.I have no idea why the code is not working Here comes The problem in next line.."
test3 ="Hello everyone .Please help me my string assigning part to char pointer in a code is not working I have been stucked on it for 3 days. I tried lot of things but the problem persists. I have no idea why the code is not working  Here comes The problem in nex"

переменная содержит только первые 256 символов.

Код

 #include <iostream>
#include <string>
#include <conio.h>
using namespace std;
int main()
{

const char *test3="Hello everyone .Please help me my string assigning part to char pointer in a code is not working I have been stucked on it for 3 days. I tried lot of things but the problem persists. I have no idea why the code is not working  Here comes The problem in next line... If you get this line in the up assigning variable..yuppieee";

cout<<test3<<endl<<endl;
getch();
return 0;

}

Проект настроен так, чтобы содержать общую среду поддержки языка (/ clr) в свойствах проекта vs2005 в 64-битном режиме компиляции.

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector