TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Griffon Chan
date: 1995-08-12 19:41:12
subject: Problem in C++

Dear all,

I'm facing a difficult problem in create and initialize an array of
structure in Borland C++ 4.0. Hope there are some smart guys can help me.
:) It will be better if the type of box[] is change to a pointer. :)

struct cell {char ch;unsigned int attr:8;};

class frame
{
  cell box[];

  public:
    frame();
};

frame::frame()
{
  // Expression syntax error here! 

  box={{'u',0x1F},{'r',0x1F},{'a',0x1F},{'t',0x1F},{'i',0x1F},{'o',0x1F},
       {'n',0x1F},{' ',0x19},{'ú',0x19},{' ',0x19},{'ú',0x19},{' ',0x19},
       {' ',0x19},{'G',0x17},{'r',0x17},{'i',0x17},{'f',0x17},{'f',0x17},
       {'o',0x17},{'n',0x17},{' ',0x17},{'º',0x19},{'È',0x10},{'Í',0x19}};
};

Note that the sequence of initialize list has no pattern and various length.

Regards,
   Griffon

--- FLAME v1.1
* Origin: 500cc F1 TBBS: 28 28.8 Lines/26 Gigs & RIP (02) 565-1630 (3:712/218)
SEEN-BY: 50/99 620/243 623/630 711/401 409 410 430 510 807 808 809 932 934
SEEN-BY: 712/218 401 404 407 505 506 515 517 619 623 704 816 848 713/888
SEEN-BY: 714/906 800/1 7877/2809
@PATH: 712/218 704 515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.