0
bloom_star7's Avatar, Join Date: Sep 2007
Newbie Member
Quote:
Originally Posted by asadullah.ansari
I did'nt mean that... I mean complex problem can be solved by C with more efficient than C++.

>>> Reason is that in C a lot of skills and time is required. Industries can'nt afford it . So they are easily using C++.
Yes. I fully agree with you that every thing is possible in C.(In fact i also moslty like C than C++ .) But the fact is that, for one thing which can be very very easily designed in C++ will take a lot lot efffort as well as will become more complex if we design in C. Take the example of disigning the interfaces with the UI applications. In case of C++ we can do it simply by making use of the virtual and pure virtual functions. But if we want to do the same thing in C then we may need to make use of the function pointers & e.t.c. e.t.c. which becomes very complex.
0
bloom_star7's Avatar, Join Date: Sep 2007
Newbie Member
Quote:
Originally Posted by oleber
In Java you just have references/pointer


The the question of the C versus C++
First of all remerber the history of the first compilers of C++, they where just translatting the code to C and after the C compiler where doing the work. Basicaly the object was passed has the first argument of the method, similar to some scripting languages today like Perl.

So a good desing can be done in any language, since good design should not depend of the programming language.
Yes. I agree that in java we can use the refereces as the alternative to the pointers. But it will be usefull while passing the arguments to the functions. Think of using the virtual and pure virtual functions. In that case if we don't have the pointers then we may not take the full advantage of it.

If there is any conflicting or misleading statement please ignore it because i don't know Java well.
0
asadullah.ansari's Avatar, Join Date: Jan 2008
TechCake
Quote:
Originally Posted by bloom_star7
Yes. I fully agree with you that every thing is possible in C.(In fact i also moslty like C than C++ .) But the fact is that, for one thing which can be very very easily designed in C++ will take a lot lot efffort as well as will become more complex if we design in C. Take the example of disigning the interfaces with the UI applications. In case of C++ we can do it simply by making use of the virtual and pure virtual functions. But if we want to do the same thing in C then we may need to make use of the function pointers & e.t.c. e.t.c. which becomes very complex.

In C++ we are writing a keyword Virtual or virtual assigning with zero, But generated code by this is very big and complex too. It's totally hidden to User. But you know If we will use function pointers( in place of virual ) then you know first time may be it will take time to understand and write but after that our skill will be improved .

Benefit of using C++ is only for Industries to minimize ManPower and they could make money more.
0
rekha11's Avatar, Join Date: Jan 2008
Go4Expert Member
We should choose c++ because of FOllowing reasons:
1. Compared to many of the other OO languages (i.e. Java, C# etc.), C++ has better support for the functional programming style.
2. C++ is faster
3. C++ is always the right choice for serious applications that can be re-compiled on multiple platforms.
Actully its depends on your skills.if user have the interest in c++ or other language then user will be prefer that which he has interest
dont confuse ,go on ur interest!
____________--
rekha

Last edited by rekha11; 22Apr2008 at 14:52..
0
asadullah.ansari's Avatar, Join Date: Jan 2008
TechCake
Offcourse with respect to Java &C# , C++ is fast. no doubt at all.
0
oleber's Avatar, Join Date: Apr 2007
Go4Expert Member
Off course?

Depends on the problem that you are using.
Try to use allot of:
- multiple derivation with virtual methods
- allocation and free memory
you can get a surprise with the newest version of Java.

Java was slow in the first version, really slow. but now is really comparable. It has the advantage and the disadvantage of having a VM.
What does the VM for you:
- moves your most frequently used object to the some blokes in memory, such a way that you will get them frequently in cache. Of course you can do it in C++, but who does that?
- Optimizes the code in run time, this optimization can't be done without statistics. This reduces the jumps. Your C++ compiler doesn't do it.
- From the version 1.6 your object can be allocated in the stack and you just need to do your normal code. Before this was a cancer in Java since you where always going to the heap.

So the point is: It's not clear if C++ is always faster then Java, most of the time C++ loses if you are really programming in OO way. Of course that C is faster then Java, but C is also faster then C++.

Now Java have it's problems. In average is fast, but can slow down times to times with the Garbage Collector, code optimizing, ... It isn't good for realtime systems, for that you have the serious realtime language like ADA. Clearly better suit ball than C++ for this systems, the problem is the small community and the very expansive compilers.


Please do some tests with the new version of Java, maybe you can get a surprise.
0
imrantechi's Avatar, Join Date: Feb 2008
Ambitious contributor
Quote:
Originally Posted by asadullah.ansari
I did'nt mean that... I mean complex problem can be solved by C with more efficient than C++.

>>> Reason is that in C a lot of skills and time is required. Industries can'nt afford it . So they are easily using C++.

even i feel he is right
0
johnysmith66's Avatar
Newbie Member
Hi guys,

i like C++ because it was the first programming language i learnt... which i understood a lot....
0
lead.smart34's Avatar, Join Date: Feb 2008
Contributor
c the best
0
crazytolearn57's Avatar, Join Date: Feb 2008
Go4Expert Member
good one