藍森林首頁 | 返回主頁 | 本站地圖 | 站內搜索 | 聯繫信箱 |
 您目前的位置:首頁 > 自由軟件 > 技術交流 > 應用編程


    

藍森林 http://www.lslnet.com 2006年6月6日 10:18


如何指針數組賦值?

代碼:
#include "iostream.h"
#include "stdio.h"
#include "string.h"
#include "ctype.h"
struct ylj
{char *ys[8];
struct ylj *next;
};

void main()
{struct ylj *p1;
p1=new ylj;
char ch='a';
(*(p1->;ys[1])+1)=ch;
cout<<"中文"<<endl;
}

錯誤提示:
-------------------Configuration: hh - Win32 Debug--------------------
Compiling...
hh.cpp
C:\Documents and Settings\Administrator\桌面\hh.cpp(14) : error C2106: '=' : left operand must be l-value
Error executing cl.exe.

hh.exe - 1 error(s), 0 warning(s)

如何才能給字符串一個字符一個字符的賦值?
謝謝@!



Copyright © 1999-2000 LSLNET.COM. All rights reserved. 藍森林網站 版權所有。 E-mail : webmaster@lslnet.com