Biginteger class

please guys can you help me
I need to initialize my array with an integer

class BigInteger {
     private :
		char* number; 
     public  :
	
BigInteger(unsigned int n){
	   number=new  char;	
	   while(*number!='\0'){
		   *number++;
	    }
		while (n!=0){
			 *number=n%10;
			  n/=10;
			 *number--;
		 } 	
  }

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.

markdown_Forums

1 Like