Exploding Garrmondo Weiner Interactive Swiss Army Penis

Exploding Garrmondo Weiner Interactive Swiss Army Penis (http://www.gamingforce.org/forums/index.php)
-   Help Desk (http://www.gamingforce.org/forums/forumdisplay.php?f=36)
-   -   C/C++ (http://www.gamingforce.org/forums/showthread.php?t=585)

grodiens Mar 3, 2006 01:15 PM

C/C++
 
I am great fan of C/C++ and wan´t to start a forum for all that people that understand (or want to understane) anything from it.

And I wan´t to ask. Does anyone know if C/C++works fine with the Windows XP?
I always had problem with this.

Best Regards.

Magic Mar 3, 2006 01:20 PM

Am I correct in understanding that you want to make a fansite for a programming language? Y'know there are already lots of tutorial and help sites on the Internet. Just hit up Google.

Also, I'm pretty sure C/C++ was used to write portions of Windows XP. But don't quote me on that.

grodiens Mar 3, 2006 01:30 PM

Yes, I know it, but somethings are either not easy to understand or not to find. e.g. I always try to make games with C/C++ but somethings I read in all possible places but I didnt find.

Best Regards.

RushJet1 Mar 3, 2006 02:47 PM

yes, given that you have a compiler that is compatible with windows xp (such as visual c++ or vc++.net).

any programming will work with any os as long as the it has a compiler/assembler/interpreter written for it.

Snowknight Mar 3, 2006 02:52 PM

Quote:

Originally Posted by RushJet1
yes, given that you have a compiler that is compatible with windows xp (such as visual c++ or vc++.net).

Also, the Mingw port of GCC is available for Windows through something like Dev-C++.

Gilmour Mar 3, 2006 03:03 PM

Quote:

Originally Posted by Magic
Am I correct in understanding that you want to make a fansite

Also, I'm pretty sure C/C++ was used to write portions of Windows XP. But don't quote me on that.

Thats correct :) with a some assembler

I have an industrial placement next year with www.gltrade.com and have to program multi threaded c++ code almost exclusivly, gonna be in interesting year :)

BlueMikey Mar 3, 2006 08:21 PM

Very little code for Windows is actually written in asm. Sure, the base pieces of Windows are for new editions, but those are largely untouched between version updates. It is much easier to write a great compiler once and then write everything else in a higher-level language.

Just about the only reason asm is even taught in universities anymore is because it helps broaden the understanding of how computers operate, and not much else.

Moon Mar 3, 2006 08:27 PM

grodiens:
If you want to make games in C++ and have a $100 bucks to spend, go to www.garagegames.com and download the Torque Game engine. It is the best way to build / design a game that has even been made for so cheap a price and the help forums there are excellent. Any problem you possibly could have weith it has seriously been answered by at least two people in the help forums there.

grodiens Mar 3, 2006 08:53 PM

Thank you all for the tips. Maybe I will try the Torque Game to make my games (I muss see my money first. :ashamed: )

I tried today to open the c++ but I can´t make it to work.
Does anyone knows a version that works simply with the XP?

Best Regards.

Moon Mar 3, 2006 09:04 PM

Right-click the source code, select Open With, then select "Notepad"

If you want to actually compile the code, get something like this.

grodiens Mar 3, 2006 09:10 PM

Quote:

Originally Posted by Moon
Right-click the source code, select Open With, then select "Notepad"

If you want to actually compile the code, get something like this.

Thanks a lot Moon!!

Magic Mar 4, 2006 12:04 AM

Or you could just use gcc.

grodiens Mar 4, 2006 09:26 AM

Quote:

Originally Posted by Magic
Or you could just use gcc.

Thanks Magic, It works fine:).

Best regards

Grawl Mar 4, 2006 10:37 AM

Do you even now a thing about C/C++ or are you just a newbie at it?

grodiens Mar 4, 2006 08:18 PM

Quote:

Originally Posted by Grawl
Do you even now a thing about C/C++ or are you just a newbie at it?

I can program relatively well with C but I´m not good with XP (it always worked good with windows 98).

Best Regards.

Tek2000 Mar 6, 2006 05:53 PM

I'm on the opinion C# would be THE language both for application developent and OS development if it was optimized to the degree of C/C++, allowed asm keyword for inline assembler, function calling convention mangling, forced inline keyword and native code generation.
Array bounds checking, the string implementation, and its clean syntax makes C# very neat, even better than Java since it allows gotos and pointers (not recommended maybe, but they SHOULD be even for a last resort).

(Although, in the case of writing new OS code, you'd first write all the memory management stuff before creating objects via the new instruction or threads, per example).

Kaiten Mar 6, 2006 06:43 PM

How much harder is it to program in assemly than it is in C/C++? I know it's much more arcane, but the tendancy is, the more assembly used in a program, the faster it runs (as painfully evident in my pure C++ emulators as oppsed to the likes of Kega, Gens and Zsnes).

Arainach Mar 6, 2006 08:29 PM

C and C++ are not designed to be emulated languages, which is why any "emulator" would run so poorly.

Even when programming for giant Mainframe applications that take months, programmers use high-level languages instead of assembly. Compilers do their job well and it is about infinity times easier to program in high-level as opposed to assembly.

BlueMikey Mar 6, 2006 09:11 PM

Quote:

Originally Posted by x86
I'm on the opinion C# would be THE language both for application developent and OS development if it was optimized to the degree of C/C++, allowed asm keyword for inline assembler, function calling convention mangling, forced inline keyword and native code generation.
Array bounds checking, the string implementation, and its clean syntax makes C# very neat, even better than Java since it allows gotos and pointers (not recommended maybe, but they SHOULD be even for a last resort).

Well, you can turn on ultra-optimization when compiling C# code or you can even use a non-VS compiler. I believe, and don't quote me on this because I used VS.NET/C# very shortly after it appeared, but I beliee you can write C code, or, at least, call C functions from a C# program, meaning that you can do whatever the hell you want at a lower level. Now, I never tried asm, but I believe you can either do that through C.

Java doesn't allow goto because it is not a procedural language. goto does not mean that C# has a cleaner syntax. You can say that nothing in Java is a pointer because you aren't allowed to manipulate them directly, but, really, everything in Java is a pointer.

Arainach Mar 6, 2006 09:37 PM

On C# - I'm no expert (I've just been learning it for a couple of weeks myself), but the entire point of C# is that it's strongly typed and prevents a lot of low-level activities that C and C++ allowed to that end. MS calls it a "security feature"; the rest of us call it "a pain in the ass".

BlueMikey Mar 6, 2006 09:48 PM

Yeah but, and this might only be true in VS.NET, there was an easy way to disarm those restrictions. So perhaps it only relates to C# as it is in a .NET environment but, really, last I checked it hadn't branched out beyond that.

Overkill Mar 6, 2006 10:18 PM

What. There are basically C/C++ compilers for every platform in existance. And if you want to make Windows programs, nab Visual Studio 2005 (Express, if you want a free compiler while the offer's still on), use the Windows SDK, grab the DirectX 9 SDK, and then code away. I'd think any of the basic window functionality hasn't changed since 98 for the most part, so writing a modern Windows app wouldn't be significantly different. Don't settle for GCC or Dev-C++, they're not near as well catered to the Windows platform, plus VS has the greatest API. Ever.

Arainach Mar 6, 2006 10:22 PM

Quote:

plus VS has the greatest API. Ever.
*Gag* What?

BlueMikey Mar 6, 2006 10:48 PM

It doesn't even make sense to say that compiler had a good API. :\ If you mean the documentation, uh, no. Java still is king.

Cetra Mar 6, 2006 11:07 PM

Quote:

Originally Posted by Arainach
On C# - I'm no expert (I've just been learning it for a couple of weeks myself), but the entire point of C# is that it's strongly typed and prevents a lot of low-level activities that C and C++ allowed to that end. MS calls it a "security feature"; the rest of us call it "a pain in the ass".

Well, this is what bothers me about programmers who pretty much rely on the ease of a high level language. It really isn't a pain in the ass, rather C# forces you into using proper programming techniques you should have learned from the start.

C# was designed mostly with network and internet programming in mind where a lot of proper programming practices need to be observed to maintain security. The problem is most C programmers simply never learned what those practices were and never had to face them being they only have dealt with a single local machine. As a result they had to make the C# language very ridged in hopes in doing so would teach programmers proper programming via the language structure.

Bigblah Mar 6, 2006 11:11 PM

Quote:

Originally Posted by www.sega.co.jp
How much harder is it to program in assemly than it is in C/C++?

Check out the (very simple) multiplayer (via serial port) pacman game I had to write for a module last semester, and see for yourself.

http://www.bigblah.net/upload/wspg.asm

Magic Mar 6, 2006 11:24 PM

Quote:

Originally Posted by Arainach
On C# - I'm no expert (I've just been learning it for a couple of weeks myself), but the entire point of C# is that it's strongly typed and prevents a lot of low-level activities that C and C++ allowed to that end. MS calls it a "security feature"; the rest of us call it "a pain in the ass".


Isn't the whole point of high-level languages that you let the compiler generate all the Assembly? What's the point of using low-level code in the middle of C/C++?

BlueMikey Mar 6, 2006 11:37 PM

Optimization, it is an incredibly common thing to have C code call external functions written in asm.

Cetra Mar 6, 2006 11:50 PM

Quote:

Originally Posted by Magic
Isn't the whole point of high-level languages that you let the compiler generate all the Assembly? What's the point of using low-level code in the middle of C/C++?

Because even some of the best compilers do things you don't want it to. They do make mistakes fairly often and the only way to resolve the issue is to edit the generated assembly by hand.

Arainach Mar 7, 2006 12:21 AM

Quote:

Originally Posted by Magic
Isn't the whole point of high-level languages that you let the compiler generate all the Assembly? What's the point of using low-level code in the middle of C/C++?

By "low-level" I refer even to thing like Pointers - to even use the damned things you must compile your code with the "unsafe" option. A fundamental concept to be sure, and not all that low-level, but one that C# doesn't like.

http://www.c-sharpcorner.com/Code/20...UnsafeCode.asp

Overkill Mar 7, 2006 03:01 PM

Argh. I sorry. I didn't mean best API... Ew. That was a rather sad mistake. Er... Best IDE. This is why acronyms are evil. I like VS's interface, not the library. Sorry for the misunderstanding. :/

Arainach Mar 7, 2006 03:06 PM

The VS IDE is.... OK. Still can't touch vim+make in my book. Or Eclipse if you truly need an honest-to-god IDE.

BlueMikey Mar 7, 2006 09:04 PM

But vim+make isn't an IDE, so that doesn't really count.

Eclipse came out near the end of my college career, so I didn't really get into it, being set in my ways, but a few of my student teachers turned me on to it. Had I stuck with programming and Java, I would have made the switch to it eventually.

DarthSavior Mar 8, 2006 01:19 PM

I've had some time with C and C++ last semester, and now dealing with assembly this semester. It's more of a bitch to do things that would be considered "simple" in C/C++ in assembly. What could take like 3-4 lines of code in C/C++ would take 2-3 times more (occassionally even more) code in assembly.

But then again, if you saw Blah's example, you'd now this by now.

Oh yeah, forgot to mention the original post. I've compiled C/C++ programs (although all were run in a DOS window) and they worked fine in Windows XP.

vincent_ray21 Mar 9, 2006 09:29 PM

Using assembly you can make a program run faster than using program written in C/C++. Especially local variables, which can be removed, by using only registers (which cannot be accessed in high level language).

Most basic functions in C/C++ are written in assembly for the purpose of speed like the function strcpy, strlen. Which are written in assembly (as of the libraries of VC++). In tracing the function, you will see assembly immediately.

There are some software that fit using assembly, like hardware communication. Which includes software driver, etc. and some program that are fit using high level like C/C++, business software since maintenance is also part of the cost of developing software.

Arainach Mar 9, 2006 10:43 PM

Nowadays, when CPU time is cheap and coding time isn't, writing assembly is just plain stupid. Your code isn't portable, is more painful to debug and read, and the speed benefit is very negligible.

BlueMikey Mar 10, 2006 12:08 AM

There are many applications where any improvement is worth it. Consider a program which is run billions of time every day versus the time it takes to code a function once.

vincent_ray21 Mar 10, 2006 02:16 AM

Operating system and system software like anti-virus and firewall must be written in such low level so that they will execute much quicker.

As the computer grows faster, we users install and use more software. And programmers tend to use the potential of the faster computer (Game is a good example).(I think it’s proportional: more speed = more software = more memory usage :) .)

Even using such low-level or high level, if the algorithm of the software is slow, any implementation will not make it faster.

Tek2000 Mar 19, 2006 09:19 PM

Quote:

Originally Posted by Arainach
Nowadays, when CPU time is cheap and coding time isn't, writing assembly is just plain stupid. Your code isn't portable, is more painful to debug and read, and the speed benefit is very negligible.

Isn't it stupid when one pays about 2x the price of a processor for a faster model, then happily wastes CPU cycles because the software isn't properly optimized?
ASM, used wisely, is used to optimize concrete areas of an application, not to develop entire applications (that's just overkill, and one could end up reinventing the square wheel if not careful).
As for portability, it's ok when an application is portable between OSes, but most times you aren't going outta the x86 architecture so it's not much of a deal.

Cetra Mar 19, 2006 09:46 PM

Quote:

Originally Posted by BlueMikey
There are many applications where any improvement is worth it. Consider a program which is run billions of time every day versus the time it takes to code a function once.

Exactly. When you have a program where 1% of your code accounts for 50% of your runtime (which is VERY common) then why the hell would you not recode that 1% in Assembly?

PUG1911 Mar 21, 2006 12:01 AM

Quote:

Originally Posted by Arainach
Nowadays, when CPU time is cheap and coding time isn't, writing assembly is just plain stupid. Your code isn't portable, is more painful to debug and read, and the speed benefit is very negligible.

And this is precisely why it takes 256MB of RAM and a 700+Mhz CPU to run a spreadsheet today. When spreadsheets did the same shit on a 486. The same reason why an itty-bitty VB database frontend takes 30MB of RAM to run a simple query.

Tek2000 Mar 21, 2006 07:02 PM

Usually, such high requirements aren't due to high language coding but because of inadequate data structures and/or bloatware.

Arainach Mar 21, 2006 09:28 PM

Quote:

Originally Posted by PUG1911
And this is precisely why it takes 256MB of RAM and a 700+Mhz CPU to run a spreadsheet today. When spreadsheets did the same shit on a 486. The same reason why an itty-bitty VB database frontend takes 30MB of RAM to run a simple query.

First off, x86 hit your complaints on the head.

Second, who DOESN'T have 256MB of RAM and 700Mhz? I have 6 machines meeting those qualifications in my house (0 that don't), a stack of 550-700Mhz Pentium III chips sitting on my desk that I have nothing to do with, and a bag of 128MB PC100 and PC133 RAM sticks that I have nothing to do with. You can find better hardware at Goodwill.

And I guess "Third" would be stop using MS Office 2003. I've ran OpenOffice 2.0 on Pentium-75s with 128MB of RAM.

Overkill Mar 21, 2006 11:30 PM

Even though ASM is useful in cases, I'd much rather avoid it when possible. Just let the compiler do its job.

Personally, I dig Python a lot more than C/C++, and Python is an interpretted language, so it's even slower than C. But really, it makes up for the slowness with awesome. I'm sure some of you hate it because it doesn't have strict variable typing and indentation rules and whatnot, but I love it. The library, the simplicity, the forced convention of spacing, generator functions, lists, tuples, dictionaries, not having to use confusing templates... <3.

vincent_ray21 Mar 22, 2006 03:37 AM

Even I am using Java, which I considered the slowest language that I have used, since it is both compiled and interpretted.

More program especially business program doesn't need to run very efficient that it must be written in assembly. It's the logic and algorithm that count. Even you use assembly but the logic takes n * n to finish(I don't know how to write n square). It will be defeated by a logic that takes log n, n or even n * log n written in latest language.

Programmers tends to choose language which they can work/compatible with so that they can create software much faster.

The compilers are also being develop/upgrade so that it can be more efficient and have more options to give.

Arainach Mar 22, 2006 09:28 AM

The main slowdown of Java is the horrendous VMs out there today. If someone could write a good, efficient VM, it'd become the complete industry standard overnight. But that giant level of overhead is what keeps other stuff like C++ and C# going. Heck, I haven't even bothered learning Java yet. I suppose eventually I should.

Soluzar Mar 22, 2006 10:29 AM

Quote:

Originally Posted by Arainach
The main slowdown of Java is the horrendous VMs out there today. If someone could write a good, efficient VM, it'd become the complete industry standard overnight. But that giant level of overhead is what keeps other stuff like C++ and C# going. Heck, I haven't even bothered learning Java yet. I suppose eventually I should.

I'll believe that when I see it. Java is a proprietary dead end. It's C++ with all the good bits stripped out and replaced with junk.

libc Mar 22, 2006 03:00 PM

Quote:

Originally Posted by Bigblah
Check out the (very simple) multiplayer (via serial port) pacman game I had to write for a module last semester, and see for yourself.

=o

You, sir, have my respect.

Double Post:
Quote:

Originally Posted by Soluzar
Java is a proprietary dead end.

There exists free (as in free-beer) ports, the most famous one being gcj, but I think it is still incomplete.

Java is pretty strong today, with a *lot* of business-critical applications. I'm not expecting it to disappear quickly.

(I say that, and I just hate Java)

However, you can be sure Microsoft will try to kill it with its C#

Tek2000 Mar 22, 2006 07:44 PM

Quote:

Originally Posted by Arainach
I've ran OpenOffice 2.0 on Pentium-75s with 128MB of RAM.

OK. How many hours did it take to simply boot the application?.:edgartpg:

BlueMikey Mar 22, 2006 09:21 PM

Quote:

Originally Posted by vincent_ray21
More program especially business program doesn't need to run very efficient that it must be written in assembly. It's the logic and algorithm that count. Even you use assembly but the logic takes n * n to finish(I don't know how to write n square). It will be defeated by a logic that takes log n, n or evenn * log n written in latest language

You're right that a good algorithm is the most important factor in a runtime, but you don't have to write a whole program in ASM. You can write small functions in ASM that your code in a higher-level language calls to get around compiler imperfections.

Quote:

Originally Posted by Soluzar
I'll believe that when I see it. Java is a proprietary dead end. It's C++ with all the good bits stripped out and replaced with junk.

C++ has no good "bits". That's what people like about it, it is basically nothing, allowing users to do whatever they want with no protection whatsoever.

Java is very important, I think the 3rd most used language (outside of C and C++). Sun, as a caretaker, has gone to vast lengths to improve it, there is one single body to make changes to the language and they never make poor decisions. I think it is still the easiest language to learn (not just the language itself, but it is easy to learn concepts in), so it definitely has its educational purposes.

Arainach Mar 23, 2006 12:34 AM

Quote:

Originally Posted by x86
OK. How many hours did it take to simply boot the application?.:edgartpg:

About 84 seconds. Most of that due to the piece-of-crap <4200RPM HD in the box.

Magic Mar 23, 2006 01:18 AM

Quote:

Originally Posted by x86
OK. How many hours did it take to simply boot the application?.:edgartpg:

About 10 seconds (or less, I counted in my head) on a real computer. OpenOffice got better.

Edit: Although I compiled it natively in Linux, so maybe that had more to do with it.

Tek2000 Mar 23, 2006 04:20 PM

Quote:

Originally Posted by Arainach
About 84 seconds. Most of that due to the piece-of-crap <4200RPM HD in the box.

84 seconds just for a text editor? I don't have such a patience. Plain and simple.

RacinReaver Mar 23, 2006 05:09 PM

I'm actually curious how much of a functionality difference there is between Office 95 and Open Office such that you'd want to wait 84 seconds for a word processor to load when I remember having Office 95 load faster on my 300mhz machine than Office XP does on my current one.

Soluzar Mar 23, 2006 07:17 PM

Quote:

Originally Posted by BlueMikey
C++ has no good "bits". That's what people like about it, it is basically nothing, allowing users to do whatever they want with no protection whatsoever.

I'll agree to that, and it's this functionality that has been removed from Java, which is ringfenced, and protected.

Quote:

Java is very important, I think the 3rd most used language (outside of C and C++). Sun, as a caretaker, has gone to vast lengths to improve it, there is one single body to make changes to the language and they never make poor decisions. I think it is still the easiest language to learn (not just the language itself, but it is easy to learn concepts in), so it definitely has its educational purposes.
Proprietary. That's a dirty word in programming circles. I'll agree it has educational value, but I wouldn't use Visual Basic, and I won't use Java. Same reason.

Double Post:
Quote:

Originally Posted by libc
There exists free (as in free-beer) ports, the most famous one being gcj, but I think it is still incomplete.

Aye. However, proprietary are the roots of the language, and proprietary are most of the fruitful branches. The free version can't really change that. In truth, I see no reason why it should.

Quote:

Java is pretty strong today, with a *lot* of business-critical applications. I'm not expecting it to disappear quickly.
Me either, but I'm also not expecting it to become any more important than it already is. If a genuinely free (and platform-agnostic) language were to launch right now, it would have a good shot, I feel.

Arainach Mar 23, 2006 07:48 PM

Quote:

Originally Posted by x86
84 seconds just for a text editor? I don't have such a patience. Plain and simple.

MS Office XP took over 3 minutes on that box. 2003 wouldn't start for me. It was more a reflection on the system than the program. OO.org loads in under 5 seconds on my Pentium III 800Mhz/4200RPM HD laptop.

BlueMikey Mar 23, 2006 08:49 PM

Quote:

Originally Posted by Soluzar
I'll agree to that, and it's this functionality that has been removed from Java, which is ringfenced, and protected.

There is very little functionality that has been removed from Java that doesn't involve hackish programming. Sure, it is a pain in the ass (though possible in many cases) to alter memory directly, but, oftentimes, a person is programming quite poorly in C++ if they are taking that approach.

Quote:

Originally Posted by Soluzar
Proprietary. That's a dirty word in programming circles. I'll agree it has educational value, but I wouldn't use Visual Basic, and I won't use Java. Same reason.

Well, it's dirty, but why? If Sun wasn't taking good care of Java (they are rather famous for taking good suggestions of users and implementing them) I can see that being a problem, but it's no less a problem than a consortium having to agree on changes, which leads to little innovation generally.

Tek2000 Mar 24, 2006 02:47 AM

Quote:

Originally Posted by Arainach
MS Office XP took over 3 minutes on that box. 2003 wouldn't start for me. It was more a reflection on the system than the program. OO.org loads in under 5 seconds on my Pentium III 800Mhz/4200RPM HD laptop.

I'm not defending MS Office products here; actually I also use OpenOffice 2.0.
But a slow boot is a slow boot, whatever product you talk about.


All times are GMT -5. The time now is 07:25 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2026, vBulletin Solutions, Inc.