mockers
Would you like to react to this message? Create an account in a few clicks or log in to continue.

difference between c/c++ - "Not all C is C++"

4 posters

Go down

difference between c/c++ - "Not all C is C++" Empty difference between c/c++ - "Not all C is C++"

Post  mnnit.rahul Sun Feb 01, 2009 9:17 pm

eveyone knows c++ is made compatible with c but still ther are few codes which run fine on c but when we run the same using g++ compiler it gives error.
write such situation and why such things are not implemented in c++

mnnit.rahul

Posts : 51
Join date : 2009-02-01

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  ramthegreatcv Sun Feb 01, 2009 11:48 pm

int func()

in c++ is same as
int func(void)

but in c it means any number of arguments of any datatype.
ramthegreatcv
ramthegreatcv

Posts : 55
Join date : 2009-01-30
Age : 36

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  mnnit.rahul Tue Feb 03, 2009 5:41 pm

are bahi logo aur bahut se cases aese hai jahan c program run karta hai but c++ error deta hai.kuch to post karo

mnnit.rahul

Posts : 51
Join date : 2009-02-01

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  ramthegreatcv Tue Feb 03, 2009 11:25 pm

yes, there is some thing with static variables being external by default in c...right??
but can anybody give an proper example,with explanation.
ramthegreatcv
ramthegreatcv

Posts : 55
Join date : 2009-01-30
Age : 36

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  shivang Wed Feb 04, 2009 1:43 am

in C++ function declaration is must before its use...but in C bina declaration ke bhi cal jaata hai....
shivang
shivang

Posts : 42
Join date : 2009-01-30
Age : 35

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  Beagle Wed Feb 04, 2009 1:58 am

in C anything can be assigned to void pointer. But in C++ nothing can be assigned to void pointers unless typecasted.

Beagle

Posts : 40
Join date : 2009-01-30

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  ramthegreatcv Wed Feb 04, 2009 12:59 pm

in C ,a function if declared without a return type,its automatically taken as int.
not the case in c++(i think its an error).
ramthegreatcv
ramthegreatcv

Posts : 55
Join date : 2009-01-30
Age : 36

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  mnnit.rahul Tue Feb 24, 2009 8:13 pm

in c function with no argument represent any no of arguments while in c++ it represent no argument


abih to aur bhi difference hoge abhi to

mnnit.rahul

Posts : 51
Join date : 2009-02-01

Back to top Go down

difference between c/c++ - "Not all C is C++" Empty Re: difference between c/c++ - "Not all C is C++"

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum