fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3. struct State
  4. {
  5. State(string s) { }
  6. };
  7.  
  8. int main() {
  9. State s = "a";
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9:12: error: conversion from ‘const char [2]’ to non-scalar type ‘State’ requested
  State s = "a";
            ^
stdout
Standard output is empty