string

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • selam
    New Member
    • Nov 2006
    • 16

    #1

    string

    please help in writing the code using C++ of the following assignment
    Write a function called compstr ( ). This function should take two char * strings are arguments, compare them character by character, and return an int. (Example: when the strings are equal it returns 1, if they are different they are different it return 0). Write a main ( ) program to test the function with different combinations of strings. Us pointer notation throughout.
  • horace1
    Recognized Expert Top Contributor
    • Nov 2006
    • 1510

    #2
    Originally posted by selam
    please help in writing the code using C++ of the following assignment
    Write a function called compstr ( ). This function should take two char * strings are arguments, compare them character by character, and return an int. (Example: when the strings are equal it returns 1, if they are different they are different it return 0). Write a main ( ) program to test the function with different combinations of strings. Us pointer notation throughout.
    post the code you have written so far and then we can try to help.

    Comment

    • selam
      New Member
      • Nov 2006
      • 16

      #3
      Originally posted by horace1
      post the code you have written so far and then we can try to help.
      I don't have any code.

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #4
        Originally posted by selam
        I don't have any code.
        The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve. This question will now be closed and you will have to post a new question when you're ready.

        MODERATOR

        Comment

        Working...