Hi, Suggestions on my program please..

This is a discussion on Hi, Suggestions on my program please.. within the C++ Programming forums, part of the General Programming Boards category; Because in university it's their job to cram your head full of the complicated stuff that you wouldn't otherwise bother ...

  1. #31
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Because in university it's their job to cram your head full of the complicated stuff that you wouldn't otherwise bother learning on your own. Seriously, I have a friend who's working for the government over here and all he uses is VB.NET and ASP.

    Of course, all these comp sci dudes in university are hoping to be programming NASA's space shuttles and your futuristic refrigerators, so of course VB is of no use to them (unless space shuttles run Windows).

    **EDIT: Of course, this is WAY off topic. If anyone wants to start a VB war, I suppose it should be in another thread.
    Last edited by Hunter2; 11-21-2004 at 09:07 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  2. #32
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    VB is highly limited in it's uses. Therefor it's not tought. Plus if you wanted to learn it you would just need a couple hours to learn how to use microsofts ide. BASIC isn't an accronym, its a description. It's too basic to be of use to more than 10% of programmers.
    Hmm

  3. #33
    Registered User
    Join Date
    Jun 2004
    Posts
    52
    You guys have destroyed my thread............*cries*

    ahhhhhhh!

  4. #34
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    >> I challenge you to make a dos prompt say "Hello World" with Visual Basic. You can't. <<

    Challenge accepted.

    Code:
    Option Explicit
    Private Const STD_OUTPUT_HANDLE = -11&
    Private Declare Function AllocConsole Lib "kernel32" () As Long
    Private Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As Long) As Long
    Private Declare Function WriteConsole Lib "kernel32" Alias "WriteConsoleA" ( _
        ByVal hConsoleOutput As Long, ByVal lpBuffer As String, ByVal nNumberOfCharsToWrite As Long, _
        lpNumberOfCharsWritten As Long, lpReserved As Any) As Long
    
    Sub PrintConsole(sOut As String)
        
        Dim hStdOut As Long, cWritten As Long
        
        AllocConsole
        hStdOut = GetStdHandle(STD_OUTPUT_HANDLE)
        If (WriteConsole(hStdOut, sOut, Len(sOut), cWritten, ByVal 0&) = 0) Then _
            Err.Raise 1
    End Sub
    
    
    Sub main()
        PrintConsole "Hello World!" & vbCrLf
        PrintConsole "The time is " & Time & vbCrLf
        PrintConsole "The date is " & Date & vbCrLf
        PrintConsole "The date in 100,000 minutes will be " & DateAdd("n", 100000, Now)
    End Sub
    More VB Console Examples

    >> By the way, I'm still in my first year of VB, is it usable for web applications? I've never really been clear on that.. Just asking. <<

    Yes. VBScript is the language of choice for ASP classic. VB.NET is one language that can be used for ASP.NET.

    >> C++ has a much wider range. <<

    I totally disagree. VB is in common use for scripting (VBScript), CGI scripts (VBScript or VB.NET), executable programs (VB), .NET interpreted programs (VB.NET) and macros (VBA for Word, Excel, Wordperfect, Access etc). C++ is in common usage only for executable programs.

    >> there are still many things that you HAVE to use C++ for. <<

    There are still some things you have to use plain C or even assembly for. Does that lessen the value of C++?

    >> It's too basic to be of use to more than 10% of programmers. <<

    I would lay a small bet that there is as many programmers making money from writing in VB as their is from writing in C++. It is certainly a useful language for windows programmers to know. It is a common misunderstading that VB is too simple to do many things. This is wrong. VB can do just about anything that a standard executable can do that is written in any other language.

    Have a look at what vbAccelerator does with VB and then call it simple. I challenge you to implement any one of those things in C++.

    There are some drawbacks to VB, but to claim that it is not a useful language is simply false. As C/C++ programmers we look at VB program with an air of superiority. The user on the other hand, looks at a working, quickly implemented program, that crashes less often and costs them half the price.

  5. #35
    Registered User
    Join Date
    Jun 2004
    Posts
    52
    Since we are so totally off topic already what is a good free VB compiler?

    I am dling vb4gl right now looks promising. Anyone know any other good free ones?

  6. #36
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>what is a good free VB compiler?
    Only compiler/IDE I've ever heard of is Microsoft Visual Basic, excepting the one you're downloading, which I just heard of now
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  7. #37
    Registered User
    Join Date
    Jun 2004
    Posts
    52
    Is MSVB free of do u have to pay?

    Why am I even asking this??

    The Microsoft name is attached of course it will cost money.

    Anywaz an answer would be nice thanks guys!

  8. #38
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    Visual Basic.NET Beta (Free download)

    You can program with VBA from within word. Goto Tools->Macros->Visual Basic Editor. You can also record a macro and view the code generated.

    VB 6, the last version of VB classic is not free. If you are a student you should be able to get an academic version cheaply, otherwise the learning edition is available with some books. If that fails, check out eBay.

  9. #39
    Registered User
    Join Date
    Mar 2004
    Posts
    40
    Code:
    #include <iostream.h>
    int main() {
      cout << "Hello World!\n";
      system("PAUSE");
      return 0;
    }
    When VB becomes more complicated than C++, you have lost.


    Siggy, when I try to load my game after buying Mithril Gloves all my stats go to 0 except strength which is at 1. I'm not sure if it happens with other equip because that's all I bought, but you might want to check into that.
    Last edited by ShadowMetis; 11-23-2004 at 07:42 AM.
    Code:
    #include <iostream.h>
    int var;
    int test();
    int main() { 
     cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n";
     cin >> var;
     return test(); }
    int test() {  
     if(var == 1) {
      cout << "Y0u 4r3 t3h 1337\n";
      system("PAUSE");
      return main(); }
     else if(var == 2) {
      cout << "N00B3R!\n";
      system("PAUSE");
      return main(); }
     else if(var == 3) {
      cout << "You were not thought of.\n";
      system("PAUSE");
      return main(); }
     else {      
      return 0; }}

  10. #40
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Code:
    #include <iostream>
    int main()
    {
    std::cout << "Hello World!" << std::endl;
    cin.get();
    return 0;
    }
    At least write your code properly In a Hello World program, you've managed to break the standard, forget to flush the output stream, AND you've introduced a security vulnerability.

    >>When VB becomes more complicated than C++, you have lost.
    Yeah, now try writing a windowed application. While C++ is slightly simpler for a console application (if you don't take into account VB's built-in types and implicit conversion routines etc.), it is MUCH more complex for a windowed application; when taking all factors into consideration, C++ has overall the more complicated code by far.
    Last edited by Hunter2; 11-23-2004 at 08:35 AM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  11. #41
    Registered User
    Join Date
    Mar 2004
    Posts
    40
    Can VB even make its program invisible?
    I know they're too simple to need a command to show the window...... So there's no way to not put the ShowWindow command... And can they have multiple windows?
    Code:
    #include <iostream.h>
    int var;
    int test();
    int main() { 
     cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n";
     cin >> var;
     return test(); }
    int test() {  
     if(var == 1) {
      cout << "Y0u 4r3 t3h 1337\n";
      system("PAUSE");
      return main(); }
     else if(var == 2) {
      cout << "N00B3R!\n";
      system("PAUSE");
      return main(); }
     else if(var == 3) {
      cout << "You were not thought of.\n";
      system("PAUSE");
      return main(); }
     else {      
      return 0; }}

  12. #42
    Registered User
    Join Date
    Mar 2004
    Posts
    40
    PS. Would it or would it not work for my example? Don't nitpick me on something I took ten seconds between bites of my sandwich to put together.......
    Code:
    #include <iostream.h>
    int var;
    int test();
    int main() { 
     cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n";
     cin >> var;
     return test(); }
    int test() {  
     if(var == 1) {
      cout << "Y0u 4r3 t3h 1337\n";
      system("PAUSE");
      return main(); }
     else if(var == 2) {
      cout << "N00B3R!\n";
      system("PAUSE");
      return main(); }
     else if(var == 3) {
      cout << "You were not thought of.\n";
      system("PAUSE");
      return main(); }
     else {      
      return 0; }}

  13. #43
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>Can VB even make its program invisible?
    Me.Visible = False

    >>to not put the ShowWindow command
    You can create a visible window without the ShowWindow() API call in C++, too. Just specify the WS_VISIBLE flag as one of the styles.

    >>And can they have multiple windows?
    Yes, otherwise I wouldn't have mentioned it in my 'challenge'. It's as simple as clicking a button to add another "form" to your project.

    **EDIT**
    PS. Would it or would it not work for my example? Don't nitpick me on something I took ten seconds between bites of my sandwich to put together.......
    Depending on the compiler, it might or might not work - and then, depending on the operating system, it might or might not work (although assuming you're running Windows it probably would, if it passed the compiler test). And depending on a really rare chance, it might not work even if it passes the previous 2 tests, assuming get() doesn't flush the output stream.

    Also, if you want to 'P.S.' your post, you can click the 'edit' button on it and add your comment in at the bottom.
    Last edited by Hunter2; 11-23-2004 at 08:07 PM.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

  14. #44
    Registered User
    Join Date
    Mar 2004
    Posts
    40
    So then, yes it does work for my example....
    Listen... I'm tired of finding this post every day over this BS. Which is better? C++ or VB? We both know the answer.
    Code:
    #include <iostream.h>
    int var;
    int test();
    int main() { 
     cout << "Please input your language:\n 1. C (C,C++,C#)\n 2. VB\n 3. Other\n";
     cin >> var;
     return test(); }
    int test() {  
     if(var == 1) {
      cout << "Y0u 4r3 t3h 1337\n";
      system("PAUSE");
      return main(); }
     else if(var == 2) {
      cout << "N00B3R!\n";
      system("PAUSE");
      return main(); }
     else if(var == 3) {
      cout << "You were not thought of.\n";
      system("PAUSE");
      return main(); }
     else {      
      return 0; }}

  15. #45
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    >>Which is better? C++ or VB? We both know the answer.
    *sigh*
    You just don't get it do you? Neither one is better. There are advantages to each. It is simply incorrect to disregard either as redundant, or "n00b-ish", or "overly-complex", anything in between.

    If you ever hope to get a programming job, I'd suggest that you open your mind and quit snooting at 'simpler' languages and interfaces; that's where the vast majority of employment lies.
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can someome help me with a program please?
    By WinterInChicago in forum C++ Programming
    Replies: 3
    Last Post: 09-21-2006, 10:58 PM
  2. Need help with my program...
    By Noah in forum C Programming
    Replies: 2
    Last Post: 03-11-2006, 06:49 PM
  3. Inserting text into MDI program
    By Rutabega in forum Windows Programming
    Replies: 0
    Last Post: 12-23-2005, 10:25 AM
  4. Replies: 2
    Last Post: 05-10-2002, 04:16 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21