c 2b 2b get extension

Solutions on MaxInterview for c 2b 2b get extension by the best coders in the world

showing results for - "c 2b 2b get extension"
Maite
09 Aug 2017
1#include <iostream>
2#include <string>
3using namespace std;
4
5string GetFileExtension(string Filename)
6{
7   size_t LastDot = Filename.find_last_of(".");
8
9   if (LastDot == string::npos)
10   {
11      return ""; // No extension in Filename string
12   }
13
14   return Filename.substr(LastDot);
15}
Rafaela
23 Jan 2021
1All C++ header extensions: .c , .h , .hpp , .hxx , .cpp , .hh
2C++ file (items / source code): .cpp , .cc , .cxx
3