此问题已在此处有答案:
initialized string in MASM struture(2个答案)
昨天关门了。
我尝试创建结构(你可以在下面的代码中看到它),但是当我创建结构项时,我得到错误“error A2036:结构的初始值太多”。有什么问题吗?
.686
.model flat, stdcall
option casemap:none
include C:\masm32\include\windows.inc
include C:\masm32\include\user32.inc
include C:\masm32\include\kernel32.inc
include C:\masm32\include\masm32.inc
includelib C:\masm32\lib\user32.lib
includelib C:\masm32\lib\kernel32.lib
includeLib C:\masm32\lib\masm32.lib
Good STRUCT
Title BYTE 20 DUP(?)
Description BYTE 20 DUP(?)
Price DWORD ?
Count DWORD ?
Good ENDS
.data
good_1 Good <"Macbook", "Notebook", 1600, 13>
good_2 Good <"Ipad", "Ipad", 800, 24>
good_3 Good <"Test", "Test", 250, 24>
在每一行我得到相同的错误,但我输入了正确的初始值的数量。
1条答案
按热度按时间hl0ma9xz1#
感谢戴评论,我发现问题出在“标题”保留名上。