It there a way to get this to compile?

WhatMeWorry kheaser at gmail.com
Mon Sep 9 19:08:17 UTC 2019


Is this even possible?

klondike.d(155): Error: no identifier for declarator c
klondike.d(155): Error: declaration expected, not =

struct FoundationPile
{
     Card[] up;    // all cards are face up on the Foundation
}

FoundationPile[4] foundations;


static if(true)
{
     int r = 2;
     int c = 40;
     static foreach(i ; foundations)
     {
         immutable string brackets = "\033[" ~ to!string(r) ~ ";" 
~ to!string(c) ~ "H";			
         c = c + 10;   // line 155
     }			
}


More information about the Digitalmars-d-learn mailing list