Skip to content

Instantly share code, notes, and snippets.

@frenchie4111
frenchie4111 / Remove Spaces
Created May 11, 2014 20:59
Remove Spaces
void remove_spaces( string *s ) {
while( isspace( s->c_str()[0] ) ) {
s->erase(0,1);
}
}
int main() {
string s = "\t\tHello World";
cout << "Before: " << s << endl;
remove_spaces( &s );
@frenchie4111
frenchie4111 / GetFilesInDirectory
Last active February 9, 2023 00:58
Find All Files In Directory C++
#include <iostream>
#include <vector>
#include <string>
#include <fstream>
#include <windows.h>
using namespace std;
void GetFilesInDirectory(std::vector<string> &out, const string &directory, bool getFolderNames)
{