本文整理汇总了C++中Music::GetTitle方法的典型用法代码示例。如果您正苦于以下问题:C++ Music::GetTitle方法的具体用法?C++ Music::GetTitle怎么用?C++ Music::GetTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Music
的用法示例。
在下文中一共展示了Music::GetTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findFiles
void findFiles(char* argv, list <Music> &newMusic)
{
WIN32_FIND_DATA FindingFileData = { 0 };
HANDLE hFind = INVALID_HANDLE_VALUE;
Music *mySongs = NULL;
size_t number = 0;
//find the first file
hFind = FindFirstFile(argv, &FindingFileData);
//check to see if there was an error when finding the first file
if (hFind == INVALID_HANDLE_VALUE)
{
printf("Error\n");
}
else
{
do
{
//what ever that return true it will equal false This test the directory
if (!(FindingFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
mySongs = new Music(FindingFileData.cFileName);
if (mySongs == NULL)
{
printf("Allocation failed \n");
break;
}
//check to see if it return nothing
if ((mySongs->GetArtist() != "") || (mySongs->GetTitle() != ""))
{
//if it did not push it
newMusic.push_back(*mySongs);
delete mySongs;
}
}
} while (FindNextFile(hFind, &FindingFileData));
}
//get the container
number = newMusic.size();
//if the container it not zero allow it sort
if (number != MIN_CONTAINER_SIZES)
{
newMusic.sort();
}
//close hFind
FindClose(hFind);
}