Hi,
Another report on the dot turning into ->. This time, when I type ., VA is always chaninging into ->, which is wrong
See the file below
#ifndef _GTK_FILENAME_HPP_
#define _GTK_FILENAME_HPP_
#include <string>
namespace gtk
{
class Filename
{
std::string drive_; // drive letter only
std::string dir_; // only path
std::string fname_; // only filename
std::string ext_; // only extension
public:
Filename (const char *filepath);
Filename (const std::string &filepath);
// reparse the file info
void Parse_Path (const char *filepath);
void Parse_Path (const std::string &filepath);
// returns C:
char Get_Drive () const;
std::string Get_Full_Path () const;
std::string Get_FileName () const;
std::string Get_Extension () const;
std::string Get_Path_No_Extension () const;
std::string Get_FileName_No_Extension () const;
};
}
#endif // _GTK_FILENAME_HPP_
#include "Filename.hpp"
#include <cstdlib>
namespace gtk
{
Filename::Filename (const char *filepath)
{
Parse_Path (filepath);
}
Filename::Filename (const std::string &filepath)
{
//**** Try typing this line, VA always change to filepath->
Parse_Path (filepath.c_str ());
}
void Filename::Parse_Path (const std::string &filepath)
{
Parse_Path (filepath.c_str ());
}
void Filename::Parse_Path (const char *filepath)
{
char drive [_MAX_DRIVE];
char dir [_MAX_DIR];
char fname [_MAX_FNAME];
char ext [_MAX_EXT];
_splitpath (filepath, drive, dir, fname, ext);
drive_ = drive;
dir_ = dir;
fname_ = fname;
ext_ = ext;
}
}