Hi I was following a tutorial on sitepoint for creating structs. I must be missing something since I followed the code exactly, but keep getting an error!
Here is the code:
<cfset myBook= structNew()>
<cfset a = StructureInsert(myBook, \\"title\\", \\"All About Coldfusion\\", 1)>
<cfset a = StructureInsert(myBook, "author", "Teed Younger", 1)>
<cfset a = StructureInsert(myBook, "description", "Information About CF", 1)>
<cfset a = StructureInsert(myBook, "publishYear", "2005", 1)>
<cfset a = StructureInsert(myBook, "ISBN", "ABCD123456", 1)>
<cfoutput>
Title: #myBook["title"]#<br />
Author: #myBook["author"]#<br />
Description: #myBook["description"]#<br />
Published: #myBook["publishYear"]#<br />
ISBN: #myBook["ISBN"]#
</cfoutput>
The error says I have a missing arguement and cites line 10, but I dont see what I am missing. I also dont understand what the backslashes are for in the title struct. When I take them out to match the other structureInserts, it gives another error saying I haven't defined structureInsert. I am new to learning structs so any help is greatly appreciated!