Thread: help me

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    3

    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

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    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.

  4. #4
    Registered User
    Join Date
    Dec 2008
    Posts
    3
    this is my attempt

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    3
    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";
    	}
    }

  6. #6
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    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"

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    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.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed