CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Mar 2017
    Posts
    12

    [RESOLVED] weird warning?

    I get this warning:
    c++ issue.jpg

    MY CODE:
    Code:
    class PlayerClass{
    	public:
    		int ReturnName(){
    			return Name;
    		}
    		int ReturnLastName(){
    			return lastName;
    		}
    		int ReturnStamina(){
    			return Stamina;
    		}
    		int ReturnHealth(){
    			return Health;
    		}
    		int ReturnDistance(){
    			return StartdistancefromCamp;
    		}
    		int randVal(int min,int max){
       			return (rand() % (max - min + 1) + min);
       		}
       	private:
    		
    		int const Name = randVal(0,1);
    		int const lastName = randVal(0,1);
    		int const Stamina = randVal(3,10);
    		int Health = randVal(50,100);
    		int StartdistancefromCamp=50,PlayerDecision;
    		int MobSelect = randVal(0,2);
    };
    I'm still kinda a beginner and I've seen this warning before in other programs, although it went away eventually.
    Last edited by TheRedSpy; April 6th, 2017 at 10:38 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured