Because I can initialize a string with a direct initialization
string tentative("TENTATIVE");
string motAffiche = tentative;
but not with a reference
string tentative("TENTATIVE");
string motAffiche = tentative;
Indeed, gedit tells me that
error: conversion from 'std :: __ cxx11 :: string * {aka std :: __ cxx11 :: basic_string *} 'to non-scalar type 'Std :: __ cxx11 :: string {aka std :: __ cxx11 :: basic_string}' requested
Is it as if motAffiche
and tentative
have the same object, no?