Archived

This topic is now archived and is closed to further replies.

Marty15

Scoreboards?

Recommended Posts

how can i save a string of characters for a scoreboard or something? i have just changed to Visual Studio from borland so i dont think i can use anistrings anymore can someone help me please. Thanx

Share this post


Link to post
Share on other sites
This is an example of ansistring
---------------------------------------

AnsiString test;
int number;

test = "the length of this string is ";

// gets the length of the string
number = test.Length();

// puts number at the end of the string
test.Insert(number,number + 1);

---------------------------------------
the output would be

"the length of this string is 28"




Share this post


Link to post
Share on other sites
There are 2 parts to your question:

1. Number to String conversion is usually done with ''sprintf'' (for String print Formated, nothing to do with running around)

2. String concatenation is done with ''strcat''

Look at MSDN to find related functions


---------------------------
I may be getting older, but I refuse to grow up

Share this post


Link to post
Share on other sites
Thanks but i just remembered that i cant save the top scores when the game exits. How do i use ini files in visual studio 6?

[edited by - Marty15 on July 18, 2002 8:11:59 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The questions you are asking relate to programming concepts, not the development tool that you use.

As stated, MSDN has a wealth of information. It might be worth checking those out before posting questions here...

Share this post


Link to post
Share on other sites