True, many compilers vary slightly, I however, followed the tutorials off of this website and get such errors as:
Warning c:\lcc\projects\database\alpha\000001\alpha\db_a00 0001a.c:
c:\lcc\projects\database\alpha\000001\alpha\mud1.h : 16 missing prototype for money // What's this mean? I have it declared in the structure with the rest and it's the only one that does this...
Error c:\lcc\projects\database\alpha\000001\alpha\db_a00 0001a.c: 64 undeclared identifier `freighter' // It's declared in mud1.h though...
Warning c:\lcc\projects\database\alpha\000001\alpha\db_a00 0001a.c: 64 Statement has no effect // It says this, yet I followed the structures tutorial on this website to the letter, this line is where I typed "freighter gamma;" which is supposed to create an instance of the structure (a variable that contains modifiable variables...) right?
I also get errors such as:
Error c:\lcc\projects\database\alpha\000001\alpha\db_a00 0001a.c: 70 operands of = have illegal types `int' and `pointer to int'
Here's the code anyways:
freighter gamma;
freighter *freighter_a;
planetoids planets;
planetoids *starport;
if (freighter freighter_a && planetoids starport) {
freighter_a.name = "Gamma";
freighter_a.maxfuel = 2000;
freighter_a.fuel = freighter_a.maxfuel;
freighter_a.maxcargo = 150;
freighter_a.cargo = 0;
freighter_a.cargo_type = 0;
freighter_a.speed = 100;
freighter_a.dest = 0;
freighter_a.x = 0;
freighter_a.y = 0;
freighter_a.money = 5000;
starport.p1x = 0;
starport.p1y = 0;
starport.p1s = 200;
starport.p2x = 150;
starport.p2y = -50;
starport.p2s = 50;
starport.p3x = 100;
starport.p3y = 100;
starport.p3s = 150;
starport.rate1 = 0.5;
starport.rate2 = 0.8;
starport.rate3 = 1.25; }
freighter_a = γ
starport = &planets;
It's a little messy... All numeric variables are declared "int", freighter_a.money is "double long" and the three rates at the bottom are "float".
Can anyone help?



LinkBack URL
About LinkBacks


