how to use jpeg images in c++

Apr 9, 2008 at 3:56pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135



#include <iostream>
#include <string>

using namespace std;

class dog
{
private:
	int weight;
	string name;
public:
	dog();
	dog(int,string);
	dog(int);
	void bark();
	void identify();
	void setname(string);
	
};
 // 3 constructors
dog::dog()
{
	weight = 2;
	name="Unknown";
}

dog::dog(int a)
{
	weight = a;
	name="Mark A.";
}

dog::dog(int a, string b)
{
	weight = a;
	name = b;
}

void dog::setname(string b)
{
	name = b;
}


// Functions: 





void dog::bark()
{
	if(weight<25)
	
		cout<<"Yip! Yip!";
		
		
	
	if(weight>25 && weight<50  )
		
		cout<<"Woof!! Woof!!";

	if(weight>50 && weight<100)
		
		cout<<"Woof!! Woof!!";
		
	
	
	if(weight>100)
		
		cout<<"You have a fat dog!!";
		
	
}



void dog::identify()
{
	cout<<name<<" is a "<<weight<<"lb dog."<<endl;
}
	
int main()
{
	string name;
	int weight;
	
	cout << "INPUT THE NAME AND WEIGHT OF YOUR DOG" << endl;
	cin>>name>>weight;
       // creating  an object firstDog
	dog firstDog(weight,name);
	cout<<endl;
// Calling a function for  the object firstDog
	firstDog.bark();
	cout<<endl;
	firstDog.identify();
	
	
	cout<<""<< endl;
	cout << "INPUT THE NAME AND WEIGHT OF YOUR DOG" << endl;
	cin>>name>>weight;
       // creating  an object thirdDog
	dog thirdDog(weight,name);
	cout<<endl;
// Calling a function for  the object firstDog
	thirdDog.bark();
	cout<<endl;
	thirdDog.identify();
	
	
	
	cout<<""<<endl;
	cout<<"THE PROGRAMS DOG";
	dog secondDog(95,"Jigar");
	
	cout<<endl;
	
	secondDog.bark();
	cout<<endl;
	secondDog.identify();
	secondDog.setname("Mark A.");
	cout<<""<<endl;
	cout<<"YOUR DOG WAS RENAMED...";
	secondDog.identify();
           return 0;
}










i was wondering how to make dogs according to the sizes come up in a jpeg image??
thank you for your help!!!!!!!!
Topic archived. No new replies allowed.