Announcement

Collapse
No announcement yet.

C++

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    Everyone who posted here who isn't nockm has just made me feel a whole lot smarter. I thank you guys.

    By the way IceStorm are you in highschool? I don't think most colleges have classes that teach programming languages, it's just assummed you'll pick it up as part of the course. I'm guessing you're in one of those like "smart kids technical high schools?"
    Last edited by Sleepy Weasel; 03-23-2005, 05:01 AM.

    Comment


    • #47
      Colleges that offer degrees in Computer Science offer computer language classes. I believe at the Junior College I attend, there are 8 or so classes aimed at CS requirements, but the main class is Java because the school board switched to it 2-3 years ago. At my highschool, C++ was offered along with website design classes, so its not unusual to find that at normal public schools (or at least in California).

      Does anyone know what language was used to write the Java Virtual Machine? My bet is it's written mainly in C++.

      Comment


      • #48
        Ha Sleepy, I think fallen, telcat and 50% are much more experienced than I am. I haven't even used templates before (I have a huge list of things I have to 'do').

        Mostly to 50% Packetloss or anyone else who knows:
        I'm trying to get into ASM. When people say things like "Oh I had to code this bit in assembler", do they mean they had to use the _asm keyword? What other ways are there of using ASM?

        I just want to be able to deal with ASM should I ever need to. Does anyone know of any good books about ASM that actually teaches you how to use it in real situations? I bought "Art of Assembly Language Programming " by Randall Hyde but he uses something called HLA (High level assembler)... I don't have the time to practice on things that aren't used in real situations.
        Last edited by Nockm; 03-23-2005, 05:42 AM.

        Comment


        • #49
          Originally posted by Existenz87
          I'm interested in learning C++ and i was wondering if any of you guys could tell me about any books that are good for learning C++, keeping in mind i dont know a whole lot about programming.
          You can NOT learn a language by reading a book, you have to learn it by practice. Reading a book is a good start though.


          Originally posted by 50% Packetloss
          You also dont need to start your program with int main (int argc, char **argv), you can start it with int main() or with void main() but it all depends on your compiler. C++ books start off with iostream because it makes things easy at first and doesn't discourage the reader.
          I ALWAYS use int main () and start with return 0;
          I know it is just pedantic with small or simple projects since you do not have to check the return code for error, but I regard it as good programming practice.
          int argc and int ** argv are arguments to main, argc returns the number of arguments passed to the program (including the program itself) and **argv can be seen as a 2d array, with each argument as a character array.

          I personally prefer cout to printf because it is easier to remember the syntax, but then again, it's just me.
          ☕ 🍔 🍅 🍊🍏

          Comment


          • #50
            Originally posted by Sleepy Weasel
            Everyone who posted here who isn't nockm has just made me feel a whole lot smarter. I thank you guys.
            You do realise that most people posted here are a lot younger than you, right?

            BTW, how about try and solve the problem I have posted above, yeah it might look simple, but I doubt you can solve it without use something as complicated as recursion or priority queue.

            Seriously I doubt you even know the difference between

            if (atoi("2") < 24)

            and

            if ('2' < 24)

            (yeah, please DO check it out on google)

            Originally posted by Nockm
            Does anyone know of any good books about ASM that actually teaches you how to use it in real situations?

            Real assemebly languages are a lot different from things like C, java and perl. I don't know why you want to learn assembly, but basically assemblies are mainly used in hardware control. You need to know hardware fairly well. I have only programmed in 1 assembly language and that was in college. To give you a flavour of assembly, i give you an example (and not using hardware stuff such as buses, logic gates or ports):

            say in C++ a loop would typically look like this:

            for(int i = 0; i < condition; i++)

            Machine language would look like this

            BEQ THERE

            it says "jump to the instruction located at the address labelled "THERE" when equal (BEQ = branch when equal).

            and that is absolute addressing with THERE been give a address say, E000A which is fairly simple. Things get slightly tougher when you have to calculate the relative address of the start of a loop (usually by adding the number of bytes used for instructions) and to get into and use pop to get things out of the register (there maybe many things pushed into it).

            I don't even want to get into the hardware bit of assembly.

            But it can be fun. Sometimes I regard that I didn't utilize the lab time back in uni to make the most of my studies.
            ☕ 🍔 🍅 🍊🍏

            Comment


            • #51
              I have done assembly before and I know how fucked up it is. I have tasted the flavour and it was sour, that was definitely low-level enough for me . Storing values in registers, remembering where you were by stack pointers, direct/indirect addressing 'n stuff. But all that I did was assignment-style level and that was 5 years ago.

              I just want to be better at it so that I can say, optimize a particular bit of code should I ever need to in the real world, and I know one day I will. Also like you said, I'll have to know hardware pretty well, well that's part of the reason too, to get to know the hardware better.
              Last edited by Nockm; 03-23-2005, 08:06 AM.

              Comment


              • #52
                Originally posted by Sleepy Weasel
                Everyone who posted here who isn't nockm has just made me feel a whole lot smarter. I thank you guys.

                By the way IceStorm are you in highschool? I don't think most colleges have classes that teach programming languages, it's just assummed you'll pick it up as part of the course. I'm guessing you're in one of those like "smart kids technical high schools?"
                ur an idiot.. Yes they do. I don't know where you get your information from but my teacher is getting there masters for programming etc.. g2g in class


                1:delta> personally, i would not go to war for oil
                1:FarScape> in age of empires you would
                1:Freeze> LOL FAR
                ---
                5:waven> freeze
                5:waven> no one talks to ease directly
                5:waven> you state your business with sanji
                5:waven> he will relay it to phizey
                5:waven> phizey will relay it to me
                5:waven> and i will talk to ease
                5:Freeze> LOL
                5:waven> that's how things work around here
                --
                1:renzi> freeze theres difference between being wasted and being a waste

                Comment


                • #53
                  select (5-3) x 7 -25 from dual;

                  there.. quite simple in 4GL
                  check technet.oracle.com and go for you free downloads (for personal use)
                  it's quite easy to learn the basic sql so i'dd recommend that.

                  OCP-seal

                  Comment


                  • #54
                    Originally posted by SEAL
                    select (5-3) x 7 -25 from dual;

                    there.. quite simple in 4GL
                    check technet.oracle.com and go for you free downloads (for personal use)
                    it's quite easy to learn the basic sql so i'dd recommend that.

                    OCP-seal
                    You can do the same with any 3rd generation language, but the objective is to manually parse the character string. Besides, SQL isn't a programming language, but a query language (like the name implies).
                    There's no place like 127.0.0.1

                    Comment


                    • #55
                      refering to my earlier post..
                      Yea i checked my sources.. Im right.
                      Most colleges ..you learn programming languages.. usually around 4 or more.
                      Mit.. You don't really learn programming languages your expected to learn them on your own or suppose to already know them.. Which im guessing your thinking.
                      Obviously ur not smart enough to get into Mit so I dont know what the hell ur thinking..

                      so what do u do for a living and how do u think you know so god damn much?

                      I've looked at alot of college classes and you usually start with C++ <_<

                      and yea im in 12th grade. lol that just makes me sound stupid....gr8
                      High School.
                      Last edited by IceStorm; 03-23-2005, 06:07 PM.


                      1:delta> personally, i would not go to war for oil
                      1:FarScape> in age of empires you would
                      1:Freeze> LOL FAR
                      ---
                      5:waven> freeze
                      5:waven> no one talks to ease directly
                      5:waven> you state your business with sanji
                      5:waven> he will relay it to phizey
                      5:waven> phizey will relay it to me
                      5:waven> and i will talk to ease
                      5:Freeze> LOL
                      5:waven> that's how things work around here
                      --
                      1:renzi> freeze theres difference between being wasted and being a waste

                      Comment


                      • #56
                        It doesn't just take smarts to get into MIT, you need a fuck load of money. You can get the same education at any school, and you can self-teach yourself anything you don't know. College students today usually start off with Java and then learn some of the other languages. But I believe you can just stick with java and get a degree in Computer Science.

                        Comment


                        • #57
                          Originally posted by Nockm
                          hey java isn't efficient so that's video games out of the window

                          as for applications, they don't use native GUI so that's that out of the window too

                          for windows apps, with C# around i reckon there's not much need for java
                          Java is not 'inefficient' nor is it slow. I have seen 3d games in java/opengl that run pretty damn nice considering. If you research the subject a little you'll see there are many comparisons/discussions pertaining to the speed of c++/c compared to java. Generally speaking java is just as fast. You can argue many aspects but 'java is slow' is largly a stereotype. Even the garbage collection in java is 'better' than you'd believe.

                          AWT is based on native GUI calls, Swing is not, it is pure java.

                          http://www.wurmonline.com/
                          http://www.eclipse.org/

                          An example of a 3d game, and a good app. Btw - java does load apps slow (due to the way java works!), that is a fact.
                          TWLB Champion Season 1 (Light)
                          TWLD Champion Season 6/7 (Elusive/Syndicate)
                          TWLJ Champion Season 7 (Syndicate)

                          1 of the first 2 to get all 3. (Fireballz is other)

                          Comment


                          • #58
                            The university I went to only taught Java, so your belief is correct I wouldn't advise anyone to go the same path, but it's not bad; just annoying having to self-teach yourself stuff that you should know already.

                            Comment


                            • #59
                              Originally posted by 2dragons
                              Java is not 'inefficient' nor is it slow. I have seen 3d games in java/opengl that run pretty damn nice considering. If you research the subject a little you'll see there are many comparisons/discussions pertaining to the speed of c++/c compared to java. Generally speaking java is just as fast. You can argue many aspects but 'java is slow' is largly a stereotype. Even the garbage collection in java is 'better' than you'd believe.

                              AWT is based on native GUI calls, Swing is not, it is pure java.

                              http://www.wurmonline.com/
                              http://www.eclipse.org/

                              An example of a 3d game, and a good app. Btw - java does load apps slow (due to the way java works!), that is a fact.
                              Thanks, I'll have a look. I have heard a lot about Java being simliar in speed to C/C++ but I only said that from my experience on making image processing apps on Java and C++. My guess is that if I made in C++ what I made in Java it would have grinded to a halt so to speak, but that's just my inference.

                              I was under the impression that it was the many combined overheads of Java that made it slower than C++, garbage, array bounds checking, the virtual machine and other stuff that I really have no clue about. I don't know any of the details and it'll be interesting to check it out.

                              Just wondering, have you tried making any computationally intensive apps in Java, and if so how was the speed compared to C++? Hmm would be kinda interesting to try out some fair test of my own

                              Comment


                              • #60
                                Had a look, Java does seem to do as well as C, if not better in some respects.
                                http://www.sys-con.com/story/?storyid=45250

                                And this:
                                Originally posted by http://www.sosnoski.com/presents/dotnetusers/java-dotnet.html
                                I looked into C/C++ vs. Java performance in detail several years ago, and have kept an eye on Java performance since. Java GUI applications have a largely-deserved reputation for poor responsiveness (though the SWT approach used by Eclipse is changing this). On the other hand, non-GUI Java performance (as with server applications) runs anywhere from the same speed as C/C++ to a maximum of perhaps 20% slower for real applications, depending on the mix of I/O and computation. This isn't enough of a difference to matter in real applications, especially given Java's proven advantages in terms of code quality and maintainability.
                                Yum. I still prefer C++ but now I don't dislike Java as much as I did before.
                                Last edited by Nockm; 03-24-2005, 05:54 AM.

                                Comment

                                Working...
                                X