|
-
May 12th, 1999, 02:36 AM
#1
filenames
assuming that i have a program that allows me to save files. how do i make the default filenames to be ( let say ) "image0" for the first file, "image1" for the second file and so on ?
-
May 12th, 1999, 03:39 AM
#2
Re: filenames
dear anonymous,
try this simple things:
Assuming that your class is CMyImage, add 2 statics members:
static CString m_sBaseName;
static int m_nNumber;
Provide also a method that asks for m_sBaseName and inits m_nNumber to 0
Then each call to a method as SaveImage will create the name of the saved file as:
CString name;
name.Format("%s%d",CMyImage::m_sBaseName,CMyImage::m_nNumber);
CMyImage::m_nNumber++;
That's all and is simple (because I am used to do that!).
Hope this will help you
Yves Le Sant
Metrology and Measurement Unit
Fundamental and Experimental Aerodynamics Departement
ONERA Meudon
(Office National d'Etudes et de Recherches Aérospatiales)
FRANCE
-
May 13th, 1999, 12:47 PM
#3
Re: filenames
hi...
thanx for your reply. i'll try that tomorrow. i'm new to VC++ programming and kind of have a deadline to meet for my project. your help is very much appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|