Last active
November 1, 2019 10:29
-
-
Save carlos-urena/341df22838a56453e98196408ba7648b to your computer and use it in GitHub Desktop.
Anonymous 'stringstream' sample (compiles, but only for some compilers)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// try this in compiler explorer with | |
// -std=c++11 -Wall -Wextra | |
// works for some compilers but not for others (add list here) | |
// (Oct, 2019) | |
#include <iostream> | |
#include <sstream> | |
#include <string> | |
int main() | |
{ | |
using namespace std; | |
cout << ((stringstream() << "hola").str()) << endl ; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: x | |
x: a.out | |
./a.out | |
a.out: a.cpp | |
g++ -std=c++11 -Wall -Wextra a.cpp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment