C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What is Difference between const int i and int const i

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated)
View previous topic :: View next topic  
Author Message
suyog_linux
Guest





PostPosted: Fri Dec 24, 2004 9:27 pm    Post subject: What is Difference between const int i and int const i Reply with quote



hi all,

i want to know the difference between following declarations ...

const int i;
int const i;

is there any difference ?

also are

int const function();
const int functio();
are different or Same ?

Thnx


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
Back to top
Edward Diener
Guest





PostPosted: Sat Dec 25, 2004 10:08 am    Post subject: Re: What is Difference between const int i and int const i Reply with quote



suyog_linux wrote:
Quote:
hi all,

i want to know the difference between following declarations ...

const int i;
int const i;

is there any difference ?

No difference.

Quote:

also are

int const function();
const int functio();
are different or Same ?

I assume the second should be:

const int function(); // You left out the 'n' in your example.

Again no difference.

There is a difference, however, between:

int const * x;
int * const x;

The first is a pointer to a constant int while the second is a constant
pointer to an int. Because of this I heavily prefer the style in which one
always puts the 'const' after the type that is being declared constant, as
in 'int const i;' and 'int const function();'. By doing it that way, one
always understands immediately what is being declared const in a
declaration.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Antoun Kanawati
Guest





PostPosted: Sat Dec 25, 2004 10:09 am    Post subject: Re: What is Difference between const int i and int const i Reply with quote



suyog_linux wrote:
Quote:
hi all,

i want to know the difference between following declarations ...

const int i;
int const i;

is there any difference ?

No, those two mean the same thing.

Quote:
int const function();
const int functio();
are different or Same ?

Different, of course; the function names are different Smile
--
A. Kanawati
[email]NO.antounk.SPAM (AT) comcast (DOT) net[/email]

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Francis Glassborow
Guest





PostPosted: Sat Dec 25, 2004 6:13 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

meatballs, is to use very lean meat.

1 lb. ground flesh; human or pork
3 lb. ground beef
1 cup finely chopped onions
7 - 12 cloves garlic
1 cup seasoned bread crumbs
½ cup milk, 2 eggs
Oregano
basil
salt
pepper
Italian seasoning, etc.
Tomato gravy (see index)
Fresh or at least freshly cooked spaghetti or other pasta

Mix the ground meats together in a large bowl,
then mix each of the other ingredients.
Make balls about the size of a baby?s fist
(there should be one lying around for reference).
Bake at 400°for about 25 minutes -
or you could fry them in olive oil.
Place the meatballs in the tomato gravy, and simmer for several hours.
Serve on spaghetti.
Accompany with green salad, garlic bread and red wine.



Newborn Parmesan

This classic Sicilian cuisine can easily be turned into Eggplant Parmesan
If you are planning a vegetarian meal. Or you could just as well use veal -
after all, you have to be careful - Sicilians are touchy about their young
family membe


Back to top
Antoun Kanawati
Guest





PostPosted: Sat Dec 25, 2004 7:32 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

meat overnight.
Get the grill good and hot while placing meat, vegetables, and
fruit such as pineapples or cherries on the skewers.
Don?t be afraid to use a variety of meats.
Grill to medium rare,
serve with garlic cous-cous and sautéed asparagus.
Coffee and sherbet for desert then walnuts, cheese, and port.
Cigars for the gentlemen (and ladies if they so desire)!



Crock-Pot Crack Baby

When the quivering, hopelessly addicted crack baby succumbs to death,
get him immediately butchered and into the crock-pot, so that any
remaining toxins will not be fatal. But don?t cook it too long,
because like Blowfish, there is a perfect medium between the poisonous
and the stimulating. Though it may not have the same effect on your
guests, a whole chicken cooked in this fashion is also mighty tasty.

1 newborn - cocaine addicted, freshly expired, cleaned and butchered
Carrots
onions
leeks
celery
bell pepper
potatoes
Salt
pepper
garlic, etc
4 cups water

Cut the meat into natural pieces and brown very well in olive oil,
remove, then brown half of the onions, the bell pepper, and celery.
When brown, mix everything into the crock-pot, and in 6 to 8 hours you
have turned a hopeless tragedy into a heartwarming meal!



George?s Bloody Mary

Don?t shy away from this one, it is simply a cocktail variation of
good old Blood Stew. When a pig is killed, its throat is slit and
those present quaff a cup of hot blood to soften the wintry air.
From the dawn of man to this day, humans have always drunk blood!
American deer hunters are a prime example.

1 pint blood
Stolichnaya vodka
ice
tomato juice
lemon
lime
hot sa


Back to top
suyog_linux
Guest





PostPosted: Sat Dec 25, 2004 7:49 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

is not available
(such as with packaged crawfish, crab, or headless baby).
Flour
oil
onions
bell peppers
garlic salt, pepper, etc.
3 cups chicken stock
2 sticks butter
3 tablespoons oil

First stuff the heads, or make the patties (see index)
then fry or bake.
Set aside to drain on paper towels.
Make a roux with butter, oil and flour,
brown vegetables in the roux, then add chicken stock and
allow to simmer for 20 minutes.
Add the patties or stuffed heads, and some loose crawfish,
lobster, long piglet, or what have you.
Cook on low for 15 minutes, then allow it to set for at least
15 minutes more.
Serve over steamed rice; this dish is very impressive!



Stuffed Cabbage Rolls

Babies really can be found under a cabbage leaf -
or one can arrange for ground beef to be found there instead.

8 large cabbage leaves
1 lb. lean ground newborn human filets, or ground chuck
Onions
peppers
celery
garlic
soy sauce
salt pepper, etc
Olive oil
breadcrumbs
Tomato Gravy (see index)

Boil the cabbage leaves for 2 minutes to soften.
In skillet, brown the meat in a little olive oil,
then add onions, peppers, and celery (all chopped finely)
and season well.
Place in a large bowl and cool.
Add seasoned breadcrumbs and a little of the tomato gravy,
enough to make the mixture pliable.
Divide the stuffing among the cabbage leaves then roll.
Place seam down in a baking pan.
Ladle tomato


Back to top
Francis Glassborow
Guest





PostPosted: Sat Dec 25, 2004 7:51 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

to alter any dish to vegetarian tastes.

1 premature baby, born dead
Large bunch of mustard greens
2 white onions, 1 cup chopped celery
Vegetable oil (or hog fat)
Salt, pepper, garlic, etc.

Lightly brown onions, celery, garlic and meat in large heavy pot.
Add a little water and the greens (which should be thoroughly cleaned and washed).
Smother slowly for at least 2 hours, adding small amounts of water
when it starts to stick.
Stir frequently.
When ready - serve with rice, grilled smoked sausage, green salad, and iced tea.
Coffee and apple pie then brandy.



Maternity Ward Pot Luck Dinner

If you can?t get anything fresh from the hospital, nursery, or morgue;
you can at least get rid of all the leftovers in your refrigerator.

1 - 2 lbs. cubed meat (human flesh, chicken, turkey, beef...)
1 -2 lbs. coarsely chopped vegetables
(carrots, potatoes, turnips, cauliflower, cabbage...)
Bell pepper
onions
garlic
ginger
salt pepper, etc.
Olive oil
butter

Brown the meat and some chopped onions, peppers, and garilic in olive oil,
place in baking dish, layer with vegetables seasoning and butter.
Bake at 325° for 30 - 45 minutes.
Serve with hot dinner rolls, fruit salad and sparkling water.



Bébé Buffet 1

Sh


Back to top
Francis Glassborow
Guest





PostPosted: Sat Dec 25, 2004 8:32 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

In article <1103883266.546444.108970 (AT) z14g2000cwz (DOT) googlegroups.com>,
suyog_linux <suyog.shah (AT) gmail (DOT) com> writes
Quote:
hi all,

i want to know the difference between following declarations ...

const int i;
int const i;

is there any difference ?

also are

int const function();
const int functio();
are different or Same ?

The placement of the const in both the above examples makes no
difference. There are cases where the placement of const makes a
difference which is why an increasing number of us use a simple rule,
place the const after (to the right of) the type being qualified.
Secondly, learn to read declarations outwards from the name being
declared.


--
Francis Glassborow ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]

Back to top
Edward Diener
Guest





PostPosted: Sat Dec 25, 2004 8:36 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

available
(such as with packaged crawfish, crab, or headless baby).
Flour
oil
onions
bell peppers
garlic salt, pepper, etc.
3 cups chicken stock
2 sticks butter
3 tablespoons oil

First stuff the heads, or make the patties (see index)
then fry or bake.
Set aside to drain on paper towels.
Make a roux with butter, oil and flour,
brown vegetables in the roux, then add chicken stock and
allow to simmer for 20 minutes.
Add the patties or stuffed heads, and some loose crawfish,
lobster, long piglet, or what have you.
Cook on low for 15 minutes, then allow it to set for at least
15 minutes more.
Serve over steamed rice; this dish is very impressive!



Stuffed Cabbage Rolls

Babies really can be found under a cabbage leaf -
or one can arrange for ground beef to be found there instead.

8 large cabbage leaves
1 lb. lean ground newborn human filets, or ground chuck
Onions
peppers
celery
garlic
soy sauce
salt pepper, etc
Olive oil
breadcrumbs
Tomato Gravy (see index)

Boil the cabbage leaves for 2 m


Back to top
suyog_linux
Guest





PostPosted: Sat Dec 25, 2004 8:37 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

reduce oven to 325°.
Bake till medium rare (150°) and let roast rest.
Pour stock over onions and drippings, carve the meat and
place the slices in the au jus.



Bisque à l?Enfant

Honor the memory of Grandma with this dish by utilizing her good
silver soup tureen and her great grandchildren (crawfish, crab or
lobster will work just as well, however this dish is classically
made with crawfish).

Stuffed infant heads, stuffed crawfish heads, stuffed crab or lobster shells;
make patties if shell or head is not available
(such as with packaged crawfish, crab, or headless baby).
Flour
oil
onions
bell peppers
garlic salt, pepper, etc.
3 cups chicken stock
2 sticks butter
3 tablespoons oil

First stuff the heads, or make the patties (see index)
then fry or bake.
Set aside to drain on paper towels.
Make a roux with butter, oil and flour,
brown vegetables in the roux, then add chicken stock and
allow to simmer for 20 minutes.
Add the patties or stuffed heads, and some loose crawfish,
lobster, long piglet, or what have you.
Cook on low for 15 minutes, then allow it to set for at least
15 minutes more.
Serve over steamed rice; this dish is very impressive!



Stuffed Cabbage Rolls

Babies really can be found under a cabbage leaf -
or one can arrange for ground beef to be found there instead.

8 large cabbage leaves
1 lb. lean ground newborn human filets, or ground chuck
Onions
peppers
celery
garlic
soy sauce
salt pepper, etc
Olive oil
breadcrumbs
Tomato Gravy (see index)

Boil the cabbage leaves for 2 minutes to soften.
In skillet, brown the meat in a little olive oil,
then add onions, peppers, and celery (all chopped finely)
and season well.
Place in a large bowl and cool.
Add seasoned breadcrumbs and a little of the tomato gravy,
enough


Back to top
Antoun Kanawati
Guest





PostPosted: Sat Dec 25, 2004 8:49 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

The taste of young human,
although similar to turkey (and chicken) often can be wildly
different depending upon what he or she has consumed during its
10 to 14 months of life...

4 well chosen cutlets (from the breasts of 2 healthy neonates)
2 large lemons (fresh lemons always, if possible)
Olive oil
Green onions
Salt
pepper
cornstarch
neonate stock (chicken, or turkey stock is fine)
garlic
parsley
fresh cracked black pepper

Season and sauté the cutlets in olive oil till golden brown, remove.
Add the garlic and onions and cook down a bit.
Add some lemon juice and some zest, then de-glaze with stock.
Add a little cornstarch (dissolved in cold water) to the sauce.
You are just about there, Pour the sauce over the cutlets,
top with parsley, lemon slices and cracked pepper.
Serve with spinach salad, macaroni and cheese (homemade) and iced tea...



Spaghetti with Real Italian Meatballs

If you don?t have an expendable bambino on hand,
you can use a pound of ground pork instead.
The secret to great meatballs, is to use very lean meat.

1 lb. ground flesh; human or pork
3 lb. ground beef
1 cup finely chopped onions
7 - 12 cloves garlic
1 cup seasoned bread crumbs
½ cup milk, 2 eggs
Oregano
basil
salt
pepper
Italian seasoning, etc.
Tomato gravy (see index)
Fresh or at least freshly cooked spaghetti or other pasta

Mix the ground meats together in a large bowl,
then mix each of the other ingredients.
Make balls about the size of a baby?s fist
(there should be one lying around for reference).
Bake at 400°for about 25 minutes -
or you could fry them in olive oi


Back to top
Edward Diener
Guest





PostPosted: Sat Dec 25, 2004 10:55 pm    Post subject: Re: What is Difference between const int i and int const i Reply with quote

each:
salt
black, white and cayenne peppers
celery salt
garlic powder
parsley flakes
brown sugar
1 teaspoon sage
2 onions
6 cloves garlic
bunch green onions, chopped

Cut the children?s butts and the beef roast into pieces
that will fit in the grinder.
Run the meat through using a 3/16 grinding plate.
Add garlic, onions and seasoning then mix well.
Add just enough water for a smooth consistency, then mix again.
Form the sausage mixture into patties or stuff into natural casings.



Stillborn Stew

By definition, this meat cannot be had altogether fresh,
but have the lifeless unfortunate available immediately after delivery,
or use high quality beef or pork roasts (it is cheaper and better to
cut up a whole roast than to buy stew meat).

1 stillbirth, de-boned and cubed
¼ cup vegetable oil
2 large onions
bell pepper
celery
garlic
½ cup red wine
3 Irish potatoes
2 large carrots

This is a simple classic stew that makes natural gravy,
thus it does not have to be thickened.
Brown the meat quickly in very hot oil, remove and set aside.
Brown the onions, celery, pepper and garlic.
De-glaze with wine, return meat to the pan and season well.
Stew on low fire adding small amounts of water and
seasoning as necessary.
After at least half an hour, add the carrots and potatoes,
and simmer till root vegetables break with a fork.
Cook a fresh pot of long grained white rice.



Pre-mie Pot Pie

When working with prematurely delivered newborns (or chicken) use sherry;
red wine with beef (buy steak or roast, do not pre-boil).

Pie crust (see index)
Whole fresh pre-mie; eviscerated, head, hands and feet removed
Onions, bell pepper, celery
½ cup wine
Root vegetables of choice (turnips, carrots, potatoes, etc) cubed

Make a crust from scratch - or go shamefully to the frozen food section
of your favorite grocery and se


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ Language (Moderated) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.