|
藍森林 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)
如何才能給字符串一個字符一個字符的賦值?
謝謝@! |
| |