I'm new to C ++ and just trying to return values passed through the constructor , I'm not sure what I've done at the code below: This is giving me an error: No example of constructor.
, 'const char [5]' to 'int' The parameter can not be changed to 3
#include A = m; This- & gt; B = N; This- & gt; X = y; } Int Test () {returned -> X; }}; Int main () {test class * A = new test class ("Test 1", "Test 2", "99 99"); The court's & lt; & Lt; To do this & gt; The test () & lt; & Lt; Endl; }
You are passing the number 9999 to "9999"
- The quotation given around it indicates that this is a string. Just pass it as 99 99
.
Comments
Post a Comment