really really need your help....plz

just past the code into your complier and you will see

1
2
3
4
5
6
7
8
9
#include<iostream>
#include<cstring>
#include<conio.h>
using namespace std;
int main(){
char a;
cout<<"ok";
getch()=a;
}
1) Telling people that they need to build the code themselves to find out what the error is, is lazy and rude. You're asking people to give up their time and effort to help you for free; the onus is on you to do as much as you can to clearly explain the problem, not to expect us to do all the work.

2) What are you trying to do with line 8? That's illegal C++. What would it even mean to try and set a function call to be equal to a value?
Last edited on
you are right mikeyboy...that's all my bad,sr...
about the line 8 i want all i recieve from getch becomes "a" so that i can eassyly see what inside getch()
So, instead of assigning the (uninitialised) value of a to the function call, you should assign the value that the function returns to a.
Topic archived. No new replies allowed.