Thread: A Unique C++ Application??

  1. #1
    Registered User
    Join Date
    May 2005
    Location
    Texas
    Posts
    103

    A Unique C++ Application??

    Hello everyone!! Does any one here have an idea on what Applications can be created with C++ that can't be done in Visual Basic with greater ease? Which are C++'s most Unique factors or characteristics?? When I try to make an application, of course in C++ on Windows API, my brother tries to make a replica of my program yet programmed in Visual Basic!! He has less than a year programming with Visual Basic, and I have more programming in C++!! I was trying to do my current project for someone special, now he does the same thing, so he can get the credit for it...because he just clicked away...and I typed (harder), so recently, I have abandoned my project that I was working so hard,because I know it doesn't even matter, because someone is doing it faster, and better looking, if they want to, and that someone special won't look at your program anymore...

    So what really does C++ Shines above the rest of the programming languages besides speed??

    Thanks...
    Be easy on me...only 14

  2. #2
    Registered User
    Join Date
    Mar 2006
    Posts
    725
    Portability? Maturity? Popularity? Every language has it's strengths and weaknesses. If you can't find anything nice about C++, go [mod edit]play[/mod edit] with VB and stop whining.
    Code:
    #include <stdio.h>
    
    void J(char*a){int f,i=0,c='1';for(;a[i]!='0';++i)if(i==81){
    puts(a);return;}for(;c<='9';++c){for(f=0;f<9;++f)if(a[i-i%27+i%9
    /3*3+f/3*9+f%3]==c||a[i%9+f*9]==c||a[i-i%9+f]==c)goto e;a[i]=c;J(a);a[i]
    ='0';e:;}}int main(int c,char**v){int t=0;if(c>1){for(;v[1][
    t];++t);if(t==81){J(v[1]);return 0;}}puts("sudoku [0-9]{81}");return 1;}

  3. #3
    Registered User Dante Shamest's Avatar
    Join Date
    Apr 2003
    Posts
    970
    Quote Originally Posted by toonlover
    When I try to make an application, of course in C++ on Windows API, my brother tries to make a replica of my program yet programmed in Visual Basic!! He has less than a year programming with Visual Basic, and I have more programming in C++!!
    The application's GUI probably wasn't very complex then. Anyway even if he can replicate the functionality, you can make it smaller/faster than his. And yours won't need the Visual Basic runtime.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    He can't write device drivers, complex games, certain scientific applications, OS memory management,...

    Visual Basic has a much lower development time and demands less of the programmer than a similar program made in C++. However, Visual Basic does this by compromising. You need a runtime to be able to run your application (VB executables need to be interpreted), you have no way of porting it into other systems like Linux or Mac without porting your code to another programming language like REALBasic, and you have little access to the OS internals.

    Visual basic is also notoriously sluggish and a memory hog. Two applications side by side with the same windows and objects, doing the exact same thing, one written in VB and another in C++, assuming both coders have mastered the programming language with which they coded it, are probably comparable by how much memory they use, how fast they process the information and how much space they occupy on disk. C++ beats VB everyday and by far. And I do know this... I program in visual basic for 11 years.

    Visual basic also offers very little in terms of OOP and has a very poor exception handling model, making writing complex programs an hard task or even impossible task. Handles math poorly (read very slooow), demands that huge libraries be present on the operating system to be able to draw some of the windows objects, and has mo multithreading support.

    If you want a real example of an application your brother couldn't write in VB... write a wav spectrum analyser in C++. And a real example on how C++ shines in terms of speed and size when compared to Visual Basic, write a madelbrot set generator.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Oh... and the best example is... tell your brother to write a C++ compiler in Visual Basic and you write a Viual Basic compiler in C++. He won't. He can't. Even if he knew how to.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Anti-Poster
    Join Date
    Feb 2002
    Posts
    1,401
    Wow, quite a bit of VB-hating going on. I'll agree that old school VB was bad, but VB.Net gets compiled into the same MSIL as any other .Net language, so it runs with similar memory and time constraints. That being said, I still don't use VB.Net. C# has fewer arbitrary rules and similar grammar, so it's more powerful.
    Quote Originally Posted by Mario F.
    Oh... and the best example is... tell your brother to write a C++ compiler in Visual Basic and you write a Viual Basic compiler in C++. He won't. He can't. Even if he knew how to.
    BS. VB is just as Turing-complete as any other language. From a theoretical standpoint, you certainly could write a C++ compiler in VB. But...come on. Would you really want to?
    If I did your homework for you, then you might pass your class without learning how to write a program like this. Then you might graduate and get your degree without learning how to write a program like this. You might become a professional programmer without knowing how to write a program like this. Someday you might work on a project with me without knowing how to write a program like this. Then I would have to do you serious bodily harm. - Jack Klein

  7. #7
    Supermassive black hole cboard_member's Avatar
    Join Date
    Jul 2005
    Posts
    1,709
    I remember good ol' VB6. I did love it's short short short development times but there were definately times when I wished it could've ran a bit faster.

    I moved onto C because I didn't think VB had much more to offer and... stuff. Then I moved onto C++ after seeing it's name on a webpage (or somewhere) one day. Well, I haven't moved away from C, I still use it quite often. I'm inclined to say it feels more comfortable to me than C++ at times.

    I don't think I'd ever go back to one of "those" languages (VB, Delphi, C# and the others). RAD is so not good for my soul.
    Good class architecture is not like a Swiss Army Knife; it should be more like a well balanced throwing knife.

    - Mike McShaffry

  8. #8
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Sort a large list of something, say, a phone book. If you have learned sorting algorithms, this is where experiece would shine. I have never actually programed in VB, but I have disliked it since I first looked at it, it is ugly. And I don't really like interpreted languages, especially those who are meant to run good on one OS and suck on the rest (if they are ever even supported on others)

  9. #9
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    everything that can be done in basic can be done in c. just sometimes it would make more sense writing a c compiler in basic instead of really doing that in basic directly

    btw: does basic have function pointers?
    its funny writing machine code into an array, then define a function-pointer to that array, and ... call it!
    Last edited by Raven Arkadon; 07-14-2006 at 10:13 AM.
    signature under construction

  10. #10
    Registered User
    Join Date
    May 2005
    Location
    Texas
    Posts
    103
    Thanks you guys, for posting answers to my question!!
    Last edited by toonlover; 07-14-2006 at 01:54 PM.
    Be easy on me...only 14

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. unique pointer issue
    By George2 in forum C++ Programming
    Replies: 11
    Last Post: 02-14-2008, 11:25 PM
  2. Problem with com application
    By amardon in forum C++ Programming
    Replies: 3
    Last Post: 10-06-2005, 05:50 AM
  3. MFC run application by clicking on file...
    By dug in forum Windows Programming
    Replies: 4
    Last Post: 12-02-2004, 04:33 AM
  4. Win application not very portable
    By swed in forum Windows Programming
    Replies: 5
    Last Post: 10-01-2001, 11:17 AM