Code: Select all
system("set /p test=test:");
Code: Select all
system("");
system("echo %test%");
Code: Select all
system("set /p test=test:");
Code: Select all
system("");
system("echo %test%");
if your coding in c++ y use batchPopPooB wrote:inwhat would be the variable for test like inbatch its %test% what would it be forCode: Select all
system("set /p test=test:");
since its notCode: Select all
system("");
system("echo %test%");
Code: Select all
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string string1 = "test";
cout << string1;
return 0;
}
Code: Select all
#include <iostream>
using namespace std;
int main ()
{
int a, b;
int result;
a = 5;
b = 2;
result = a + b;
cout << result;
return 0;
}
In c++:PopPooB wrote:inCode: Select all
system("set /p test=test:");
Code: Select all
int main()
{
int a=10;
std::string test = "Ghaaaaaaaa";
system("echo " + a);
system("echo " + test.c_str());
}