Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Matrix + Text File Read Example - By Freedom Fighters

Author
Message
Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 9th Dec 2009 02:42 Edited at: 9th Dec 2009 02:45
Matrix And Text File Read Example

Ok, Simple if you read from the heading. i made a simple example of the use of a matrix that uses reading from a text file to determine its height.

its just and example and may be not to perfect but its a start.

if looking for the text file reading look under the header MapFile
in Function : 'MapFileLoadRead'

any questions leave a post.

this is my first example making so im still new and still new to learning programming so bear with me.

Enjoy the example.

Note, i wouldnt know where to really post this example, so mod or admin if you need to move it, its fine

the attached details
File Name: Matrix + Text File Read Example.zip
File Size: 6.5mb
File Format: ZIP

Problem Solution That Never Fails: "Build A Bridge And Get Over It"

Attachments

Login to view attachments
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 9th Dec 2009 21:14 Edited at: 9th Dec 2009 22:27
code snippets would be best but here also works and is relevent
tyvm ill try it

hey im new to cpp and i got 2 questions
what does
string StrLine;

mean

ty in advance

works tyvm!!



Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 9th Dec 2009 23:18
ok, the part of string StrLine it the variable StrLine.
StrLine means nothing, its just a string variable, it could be cheese, so like string cheese and they would still mean the same thing.
to declare the string variable
use 'string ' then '<Variable Name>'

is you going to use string, make sure to include



Problem Solution That Never Fails: "Build A Bridge And Get Over It"
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 9th Dec 2009 23:34
what i ment was
whats the difference between string and a char



Freedom Fighters
14
Years of Service
User Offline
Joined: 2nd Nov 2009
Location:
Posted: 10th Dec 2009 01:02
ow. difference between a string and a char.

well, im not an expert but a string and char's. you might have to ask someone else on that subject. look in the programming section of the forums.

i just know some stuff about using them. im still new to learning this.

but for string i know it that they manage them self's. they use '\0' to define their end on their string.

im sorry but im afraid i cant help you on this. try Google on the difference on char and string.

Problem Solution That Never Fails: "Build A Bridge And Get Over It"
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 10th Dec 2009 01:27
A 'char' is a character variable that holds 1 character. ex ('c')

A 'char' array, also known as a C-string, is an array of characters that is null-terminated (ends with '/0') ex ("characters/0")

A 'string' is an STL container that, like Freedom Fighters said, uses C-strings, but wraps it all up in a much friendlier fashion, handling everything for you and making things easier. AFAIK, they are NOT null-terminated.

http://cplusplus.com/doc/tutorial/pointers/
http://cplusplus.com/reference/string/string/

Your_Health = (My_Mood == HAPPY) ? 100 : NULL;

Login to post a reply

Server time is: 2024-10-01 18:22:41
Your offset time is: 2024-10-01 18:22:41