All pastes #923708 Raw Edit

Anonymous

public text v1 · immutable
#923708 ·published 2008-02-29 19:52 UTC
rendered paste body
#include <iostream> // program uses C++ standard string class

// GradeBook class definition
class Encrypt
{
public:
   Encrypt( int );  //    and a set function
   void EncryptIt( int );
private:
   int number; // course name for this GradeBook
 
}; // end class GradeBook

Encrypt::Encrpyt( int number )
{
	EncryptIt(number);
} 
  

void Encrypt::EncryptIt(int number)
{
	int a,b,c,d;
	c = number / 10;
	b = number / 100;
	a = number / 1000;
	d = number;
	
	d = d - (c*10);
	c = c - (b*10);
	b = b - (a*10);
	

	cout << (c+7)%10 << (d+7)%10 << (a+7)%10 << (b+7)%10 << endl;
} 



ERROR 
g++ -o test encryptmain.cpp Encrypt.cpp Encrypt.h
Encrypt.cpp:6: error: ISO C++ forbids declaration of 'Encrpyt' with no type
Encrypt.cpp:6: error: no 'int Encrypt::Encrpyt(int)' member function declared in class 'Encrypt'