Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
My first algorithm with using C. #475666
01/02/19 19:04
01/02/19 19:04
Joined: Jan 2019
Posts: 12
F
First Offline OP
Newbie
First  Offline OP
Newbie
F

Joined: Jan 2019
Posts: 12
Can someone show me how to write this? I figure if I can see it wrttien first, then I can back into the coding and learn form it that way. Note: I have done the 8 tutorial workshhops.


Last edited by First; 01/03/19 02:30.
Re: My first algorithm with using C. [Re: First] #475667
01/02/19 19:26
01/02/19 19:26
Joined: Feb 2017
Posts: 1,729
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,729
Chicago

Re: My first algorithm with using C. [Re: First] #475670
01/02/19 21:35
01/02/19 21:35
Joined: Feb 2017
Posts: 1,729
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,729
Chicago
1) I see only 39 lines of code. Anyways, I believe Zorro starts counting lines from zero, whereas Notepad++ counts from one, so it's always the adjacent line.

2) For true/false variables, you should use bool instead of string.

Re: My first algorithm with using C. [Re: AndrewAMD] #475672
01/02/19 22:36
01/02/19 22:36
Joined: Jan 2019
Posts: 12
F
First Offline OP
Newbie
First  Offline OP
Newbie
F

Joined: Jan 2019
Posts: 12
I copied to another file the code I pasted here and it compiles fine now. Not sure why. Weird.

I changed the string to bool.
It compiles fine now as well and plots when tested.

Alls good...thanks!


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1