[ create a new paste ] login | about

Link: http://codepad.org/tY3uwXRm    [ raw code | output | fork ]

C++, pasted on Sep 8:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <string>
using namespace std;

struct N {
	N(const string & t_) { }
};

int main()
{
	string s1 = string("bananas");
	string s2 = "bananas";
	N n1 = string("bananas");
	N n2 = "bananas";
}


Output:
1
2
3
In function 'int main()':
Line 13: error: conversion from 'const char [8]' to non-scalar type 'N' requested
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: