Scoreboards?

Started by
6 comments, last by Marty15 21 years, 9 months ago
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
Advertisement
I''ve never used borland, but a description of what they are would be great. VS might have something similar.
-----------------------------------------------------------"People who usualy use the word pedantic usualy are pedantic!"-me
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"




Try looking into STL strings. (std::string)
Check out my music at: http://zed.cbc.ca/go.ZeD?user_id=41947&user=Laroche&page=content
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
I may be getting older, but I refuse to grow up
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]
Write- /GetPrivateProfileString and related functions.
From there MSDN will also guide you to the holy registry functions.

---------------------------
I may be getting older, but I refuse to grow up
I may be getting older, but I refuse to grow up
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...

This topic is closed to new replies.

Advertisement