Guest User

Untitled

a guest
Jan 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. //ovo je konstruktor kod class Fudbaler
  2. Fudbaler(String ^i, String ^p, String ^J): _ime(i), _prezime(p), _JMB(J), broj_utakmica(0), prosjecan_broj_golova(0){
  3. if(_JMB->Length>13 || _JMB->Length<13) throw gcnew ApplicationException("Maticni broj nije uredu! ");
  4. if(LosMaticni()==true) throw gcnew ApplicationException("Maticni broj nije uredu! ");
  5.  
  6. //a ovo je ta bool funkcija
  7. bool Fudbaler::LosMaticni()
  8. {
  9. bool x(false);
  10. for(int i=0; i<_JMB->Length;i++)
  11. if(_JMB[i]<'0' && _JMB[i]>'9')
  12. {
  13. x=true;
  14. break;
  15. }
  16. return x;
  17. }
Add Comment
Please, Sign In to add comment