Hi guys

Just thought I'd introduce myself here since this seemed like the most appropriate place.

I was a business major in college but back in high school, I was a huge computer nerd. I set up a corporate level network running off two servers (just because I had two old servers sitting around) complete with honey traps, encrypted network transmissions, stand alone firewall machines, video streaming, etc, all at home. I never really had a use for all the stuff I put in but I just did it for the heck of it.
I programmed in Java and Visual Basic back in high school. Took one look at C++ and I liked the power but it seemed so messy compared to Java.

This was, of course, all back in high school, many years ago. My Java programming skills have long since rusted away to the point where I am only able to edit, cut, paste my old code. My visual basic skills have fared much better since they've been adapted for use in Microsoft Excel and Access modules but still a far cry from my prime.

I'm getting back into the swing of programming as I am hoping to program a proof of concept myself for a DSP (Digital Signals Processing) program I've got an idea for. As my DSP program will need to run in real time, Java is just too slow and Visual Basic, like Java, is too restricted. C++ is the language that is fast enough and certainly powerful enough for realtime DSP.

I may just end up using C++ to write the heavy processing code to C++ DLLs and use visual basic to implement since Visual Basic is extremely easy with UIs.

So that's my story.
bubbleboys wrote:
Took one look at C++ and I liked the power but it seemed so messy compared to Java.


I guess it's just a matter of perspective. I look at Java and find it too restrictive, heh.

Anyway, welcome. ;)
I started reading this C++ book yesterday and today I'm onto pointers and classes. Most of its just learning C++ semantics though these pointers are ridiculously powerful. I hit on this section about bit manipulation, moving all the bits one forward or one backward. I couldn't really figure out what I would use something like that for but the amount of power in C++ is ridiculous.

Do these compiled programs run in an environment or could I accidentally destroy my computer by improperly manipulating bits?

Haven't figured out how these header files work. Do you normally break them down as one header file per class? In Java, everything was in a class.
Do these compiled programs run in an environment or could I accidentally destroy my computer by improperly manipulating bits?


No, you perform "bit-wise" operations on variables just like you can add and subtract from them. The only use I have found for bit-wise operations are for embedded platforms like AVRs and PICs.

Haven't figured out how these header files work. Do you normally break them down as one header file per class? In Java, everything was in a class.


That is completely up to you.
Generally, yes you put one class per header file, but if you wanted to, you could put everything in one header file.

And about destroying your computer...you can't really, your OS won't let you (or at least it shouldn't)
Do these compiled programs run in an environment
There's nothing that does run in some kind of environment. Having said that, C/++ programs run in unmanaged environments, which means that a C/++ program running on a system in unprotected mode can literally do anything. Fortunately, most modern OSs (e.g. Windows, MacOS, Linux, BSD) run user processes in protected mode. The most damage a user process can do is restricted to its own data (e.g. accidentally overwriting structures), and, depending on the system, data on the file system (e.g. there's nothing that can stop a program from truncating all files on a disk if the OS doesn't implement some sort of permission system).

Accidental data corruption only occurs when handling pointers, not regular variables, however, so you don't need to worry too much about this, yet.
closed account (S6k9GNh0)
@ pointers concerned with C++ semantics: Things like pointers, bit-wise operations, etc. are not C/++ specific concepts. Actually, those are available in most languages, especially assembly and have been around since... erm... memory was around.

@what header files are for: Header files are often an interface to your implementation file and with the header file, you can interact with other objects (implementation files) and many other uses. A header is often used for function definitions for libraries and user interaction. There's also something called precompiled headers which you can look into.

@C++ annihilating ones computer: C++ is a relatively unsafe language however you cannot affect your computer heavily or permanently damage it because of the OS.

@C++ in classes: classes are very powerful. However, I can recommend that you not put everything inside of a class where it doesn't belong. I often organize everything where it fits perfectly into a class for maximum sexiness but most utility functions, logging functions, etc. end up in a C-style API. No, you cannot put main inside of a class (actually, you might be able to but I don't know the process of going about it).

I'm going to bed.
thanks for all the answers guy, very helpful
hopefully I'll be able to answer questions eventually instead of just asking them
Topic archived. No new replies allowed.