Things I hate about a language

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #16
    Originally posted by markmcgookin
    Is printf like PASCAL... what was it's println command?
    printf is C to go to next line you just add \n at the end of your string

    Comment

    • Ganon11
      Recognized Expert Specialist
      • Oct 2006
      • 3651

      #17
      I believe you can still use printf and scanf in C++ by including the <cstdio> header file...or was it <cstdlib>? Either way, out of curiosity I'd like to look at the syntax of these sometime.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #18
        Originally posted by Ganon11
        I believe you can still use printf and scanf in C++ by including the <cstdio> header file...or was it <cstdlib>? Either way, out of curiosity I'd like to look at the syntax of these sometime.
        Code:
         #include <cstdio> 
        int main() {
         printf("works");
         return 0;
        }

        Comment

        • blackjack2150
          New Member
          • Feb 2007
          • 79

          #19
          Java: - The absence of properties. get set get set get set....
          - No operator overloading
          - User input:
          BufferedReader key = new BufferedReader( new InputStreamRead er(System.in));

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #20
            Originally posted by blackjack2150
            Java: - The absence of properties. get set get set get set....
            - No operator overloading
            - User input:
            BufferedReader key = new BufferedReader( new InputStreamRead er(System.in));
            Can now use Scanner for user input. Cleaner but still just as cumbersome.

            Comment

            • Banfa
              Recognized Expert Expert
              • Feb 2006
              • 9067

              #21
              Originally posted by Ganon11
              I believe you can still use printf and scanf in C++ by including the <cstdio> header file...or was it <cstdlib>? Either way, out of curiosity I'd like to look at the syntax of these sometime.
              That would be <cstdio> and I wouldn't bother with scanf, it is a poor function with serious security issues and should be avoid at all costs. I would recommend fgets followed by parsing the received string yourself, there are some useful helper functions for this like strtol etc.

              printf is easy it is just a format string with place holders ("%d" for int, "%s" for string) in it to output variable values, the variables follow the string in the parameter list. The place holders can be qualified for field size, precision, variable size and presentation and need to be looked up.

              Comment

              • blackjack2150
                New Member
                • Feb 2007
                • 79

                #22
                Originally posted by blackjack2150
                Java: - The absence of properties. get set get set get set....
                - No operator overloading
                - User input:
                BufferedReader key = new BufferedReader( new InputStreamRead er(System.in));
                I forgot to mention that you must add "throws IOException" to the header of the methods which deal with user input.

                Comment

                • r035198x
                  MVP
                  • Sep 2006
                  • 13225

                  #23
                  Originally posted by blackjack2150
                  I forgot to mention that you must add "throws IOException" to the header of the methods which deal with user input.
                  That's what the Scanner now eliminates.

                  Comment

                  • gowda gopala
                    New Member
                    • Jan 2007
                    • 4

                    #24
                    C: pointerns
                    C++:linked list

                    Comment

                    • markmcgookin
                      Recognized Expert Contributor
                      • Dec 2006
                      • 648

                      #25
                      Originally posted by blackjack2150
                      Java: - The absence of properties. get set get set get set....
                      - No operator overloading
                      - User input:
                      BufferedReader key = new BufferedReader( new InputStreamRead er(System.in));
                      what do you mean? like instead of txtBox1.text you need to do temp = getText(txtBox1 ) etc?

                      And yeah, buffered readers and action listeners etc are a pain, vive la VB Event driven programming!

                      Comment

                      • Atli
                        Recognized Expert Expert
                        • Nov 2006
                        • 5062

                        #26
                        C++:
                        Pointers are annoying but yet they give you so much control.
                        I for one would be very sad if we lost them.

                        C# :
                        There is no way to know the current index in a foreach loop.

                        PHP:
                        $.. its everywhere!

                        Comment

                        • AricC
                          Recognized Expert Top Contributor
                          • Oct 2006
                          • 1885

                          #27
                          Originally posted by markmcgookin
                          Whatever....

                          Code:
                              Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
                                  MsgBox("Hello World")
                              End Sub
                          *Waits for applause from astounded crowd*
                          Wooohoooo Mark I love the Val function

                          Comment

                          • nemisis
                            New Member
                            • May 2007
                            • 61

                            #28
                            and i dont like the language of love(the way girls think, no offense)



                            If there is something more difficult to understand, than one woman, its two women at the same time!!!!

                            Comment

                            • LacrosseB0ss
                              New Member
                              • Oct 2006
                              • 112

                              #29
                              VB: Error messages suck. Example: "Error in Row". Thanks for the debug help there! Oh, and If ... THEN. Coming back to VB after working in Java and C for a few years is driving me nuts!

                              C/++/#, Java, etc: semi-colon after every line. The endless nights of debugging code. Reading it and re-reading it to find the 1 compile error only to have a prof discover there was (a) a semi colon missing (b) a semi-colon in the wrong spot or (c) I hit shift and there was a colon somewhere. Gosh!

                              - LB

                              Comment

                              • Banfa
                                Recognized Expert Expert
                                • Feb 2006
                                • 9067

                                #30
                                Originally posted by LacrosseBoss
                                C/++/#, Java, etc: semi-colon after every line. The endless nights of debugging code. Reading it and re-reading it to find the 1 compile error only to have a prof discover there was (a) a semi colon missing (b) a semi-colon in the wrong spot or (c) I hit shift and there was a colon somewhere. Gosh!
                                You should have to examine the code to find these errors (in C/C++ and Java certainly) the output from the compiler should point you fairly straight at them.

                                Comment

                                Working...