-
help me
hello,i am new in the forum
i want from any member in this forum solution this equation (in the insertion any equation for example this (sum=sum+5;) this equation not enduring )
shown in the screen or to be product:
sum identifier
= operator
sum identifier
+ operator
5 number
; semecoln
i am new in the forum and the english language
(i love english language and c++ language)
bye
-
http://cboard.cprogramming.com/annou...t.php?f=3&a=51
http://cboard.cprogramming.com/annou...t.php?f=3&a=39
You need to show us what you can (or cannot) do yourself, then we'll be able to give you much more specific (and therefore useful) advice.
-
and as you love English you should also strive to improve your writing skills using the language as that will make it a lot easier to communicate in it.
As it is your question is pretty much incomprehensible.
-
-
this is my attempt
Code:
#include<iostream.h>
#include<string.h>
void main()
{
int a;
char=ptr new[];
a=strlen(ptr);
cout<<"enter the x"<<endl;
cin>>a;
if(a='+')
{
cout<<"operation\n";
}
if(a='=')
{
cout<<"operation\n";
}
if(a=';')
{
cout<<"semecolon\n";
}
}
-
and what's that supposed to do?
As is it won't even compile, you're including the wrong headers, you're using assignment operators where you probably mean to use logical operators, etc. etc.
And oh, you have a typo as well. It's "semicolon", not "semecolon" ;)
-
First, I would suggest reading up on how to declare a string, and read it in from the keyboard.
Then write a loop which prints a string one character at a time.