// MyString.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include const int MAX_STRING_LENGTH = 80; int m_strlen(char *str) {int length =0; while(*str) { length ++; str++; } return length; } void m_strcpy(char *str,char str2[1]) {int i =0; //int str_length=m_strlen(str2); while (str2[i]!='\0') { str[i]=str2[i]; i++; } str[i]='\0'; } int m_strcat(char *str, char *str2) { int new_length,i; int str_len,str_len2,current_pos,new_pos; new_length = m_strlen(str)+m_strlen(str2); if (new_length >MAX_STRING_LENGTH) {return -1;} else { //char *new_str = new char [new_length+1]; str_len = m_strlen(str); str_len2 = m_strlen(str2); for (i=0; i=k; i--) { str[i+len2]=str[i]; } for (i=k; i