User Profile

Collapse

Profile Sidebar

Collapse
gorskidawg
gorskidawg
Last Activity: Mar 29 '07, 07:12 PM
Joined: Feb 14 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gorskidawg
    replied to Homemade strcpy() func.
    in C
    the function should compare two strings input by the user and if they are the same, return 0, if string 1 is larger return 1 and if string 2 s larger return -1. from that the "result" variable is used to output the correct variable.
    See more | Go to post

    Leave a comment:


  • gorskidawg
    started a topic Homemade strcpy() func.
    in C

    Homemade strcpy() func.

    i am supposed to create my own strcmp() function using pointers. this doesnt return anything and i cant figure out why:
    Code:
    #include <iostream>
    //#include <cstring>
    using namespace std;
    
    int dumbstrcmp( const char *, const char * );
    
    int main()
    {	
    	char str1[100];
    	char str2[100];
    	int result;
    
    	cout << "Enter 2 strings: ";
    ...
    See more | Go to post
    Last edited by horace1; Mar 29 '07, 05:45 AM. Reason: added code tags
No activity results to display
Show More
Working...