Skip to content

Instantly share code, notes, and snippets.

@madratman
Last active February 27, 2016 18:12
Show Gist options
  • Save madratman/122193f12f7863633c59 to your computer and use it in GitHub Desktop.
Save madratman/122193f12f7863633c59 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
#include <cstring>
#define xstr(a) str(a)
#define str(a) #a
int main()
{
std::string name = "madratman";
if( xstr(name) == "name" && !strcmp(xstr(name), "name") && "madratman"==name && "madratman"=="madratman" )
{
std::cout << "1";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment