0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

comelangにコードを生成しないgenericsが入りました。

Posted at

No generating code collection

#include <comelang.h>

struct sData
{
    int a;
    int b;
};

int main(int argc, char** argv)
{
    list<object as sData>*% li = new list<object as sData>();
    
    li.add(new sData { a:111, b:222 } implements object);
    
    var data = li[0];
    
    printf("%d %d\n", data.a, data.b);
    
    puts(data.to_string());
    
    return 0;
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?