My program is only printing this:
of x is
It should be printing:
The value of x is
I don't get it. My code looks okay. The partial code is this:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int x;
x = 10;
if (x == 10)
{
int y;
cout << "The value of x is " + x;
}
system("pause");
return 0;
}
of x is
It should be printing:
The value of x is
I don't get it. My code looks okay. The partial code is this:
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int x;
x = 10;
if (x == 10)
{
int y;
cout << "The value of x is " + x;
}
system("pause");
return 0;
}