Dec 13, 2020 at 11:47pm UTC
Is somebody able to write a function that changes the information in a board for another string of caracters?
Dec 14, 2020 at 3:00am UTC
I can do that as well, though probably not as efficiently or elegantly as helios is capable of doing.
Dec 14, 2020 at 5:36am UTC
Regardless, somebody is able to write such a function.
Dec 14, 2020 at 2:58pm UTC
ask a full question -- you have to help us help you.
something like
"I am tring to do this, and I can't because some reason"
here is my attempt at it in c++ ( in code tags) :
optional but helpful:
this is the input
this is the (incorrect) output
this is the desired output
Dec 14, 2020 at 5:45pm UTC
hp14 wrote:Is somebody able to write a function that changes the information in a board for another string of caracters[sic]?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream>
#include <string>
using namespace std;
void change( string &str )
{
str = "another set of characters" ;
}
int main()
{
string a_board = "the information" ;
cout << a_board << '\n' ;
change( a_board );
cout << a_board << '\n' ;
}
Last edited on Dec 14, 2020 at 5:50pm UTC