This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Mackan90096's profile picture

[C++] My first program!

Started by Mackan90096, 26 June 2013 - 08:32 AM
Mackan90096 #1
Posted 26 June 2013 - 10:32 AM
(Yeah.. Not really first program written in C++ but the first one I release.)

Warning! This program is developed for Windows!

MackCMD Version: 0.2


So, MackCMD Is a Text interfaced program.

It's a text interface for now because I can't use graphics yet.

No screens cause there are like 4 things it does.

Let me know what you think, what should be added and stuff.

Download link: http://sourceforge.net/projects/mackcmd/files/0.2/main.exe/download

Got a wiki up and running:

https://sourceforge....kcmd/wiki/Home/


There is a Easter Egg!

(protip: send me a message about the easter egg if you want a clue ;)/> )
nutcase84 #2
Posted 26 June 2013 - 10:46 AM
You should change the download link to dl not www.
Mackan90096 #3
Posted 26 June 2013 - 10:59 AM
You should change the download link to dl not www.

Done!
Spongy141 #4
Posted 27 June 2013 - 04:31 AM
Had to disable my security to use it… would be nice if it did more than it does right now… and try adding visual affects.
Mackan90096 #5
Posted 27 June 2013 - 04:58 AM
Had to disable my security to use it… would be nice if it did more than it does right now… and try adding visual affects.

1. That you had to disable your security is a bug.
Edit:
That may be because im using system() (like system("CLS"); )
2. I'm working on adding more functionallity.
3. What do you mean by visual effects?
Spongy141 #6
Posted 27 June 2013 - 02:46 PM
Had to disable my security to use it… would be nice if it did more than it does right now… and try adding visual affects.

1. That you had to disable your security is a bug.
Edit:
That may be because im using system() (like system("CLS"); )
2. I'm working on adding more functionallity.
3. What do you mean by visual effects?
Idk why, but I didn't find it to much of a problem to disable it for the time I was trying your program out. And visual effects, like animations. I'm guessing it might be hard to do so with C++, at least I would find it hard XD. Anyways, it seems nice, if your planing on making a real OS. I might try it out when it's finished.
Mackan90096 #7
Posted 30 June 2013 - 04:51 PM
*BUMP*
Orwell #8
Posted 30 June 2013 - 07:33 PM
The Easter Egg was easy to find by just browsing through the data segment of the executable.
Also, your program behaves somewhat strange when using Wine on Ubuntu. Not sure if it's Wine or the program… But the clock isn't working for me, it sort of restarts the program.
Engineer #9
Posted 30 June 2013 - 07:36 PM
*BUMP*
So, I guess you want some feedback:

First of all, why did you rlease this? Not because it's 'bad' (I can't do it, props to you) but because it doesnt make sense to me. I have made several Java programs, but I never released them. That was just because the program I had written isnt usefull at all. I was just proud on it that I made something like that, and threw it away.

I did that, because there are way better programs out there, which will make my program look like.. Sh*t.

In the past I have released some programs on the forums which are not necessarily better than others. I dont really regret it, but Im not doing it again. Just because it doesnt make sense.

Its like this: how bigger the number how better it is. There is a 1000 available, but I take the 100 instead. Doesnt make sense, right?

But I must say, I really like feedback from others on programs too. But Im starting to feel bad when Im creating that 100 and in the end I lose interest in that 100. So long story short, it takes a while before you can get proper feedback on programs, actual code is another story.

This is how I think about it, you probably wont, but eh, you made something you are proud of. Keep that spirit!

Edit: where do you need an empty wiki for? 0.o
Am I missing something?
Mackan90096 #10
Posted 01 July 2013 - 02:59 AM
*BUMP*
So, I guess you want some feedback:

First of all, why did you rlease this? Not because it's 'bad' (I can't do it, props to you) but because it doesnt make sense to me. I have made several Java programs, but I never released them. That was just because the program I had written isnt usefull at all. I was just proud on it that I made something like that, and threw it away.

I did that, because there are way better programs out there, which will make my program look like.. Sh*t.

In the past I have released some programs on the forums which are not necessarily better than others. I dont really regret it, but Im not doing it again. Just because it doesnt make sense.

Its like this: how bigger the number how better it is. There is a 1000 available, but I take the 100 instead. Doesnt make sense, right?

But I must say, I really like feedback from others on programs too. But Im starting to feel bad when Im creating that 100 and in the end I lose interest in that 100. So long story short, it takes a while before you can get proper feedback on programs, actual code is another story.

This is how I think about it, you probably wont, but eh, you made something you are proud of. Keep that spirit!

Edit: where do you need an empty wiki for? 0.o
Am I missing something?

Yep, I wanted feedback.
I release my stuff because I think that it's a good idea.
Oh, the wiki isn't empty either.
Apfeldstrudel #11
Posted 02 July 2013 - 01:12 PM
Mine was cout>>"Hello world!" :P/>
Mackan90096 #12
Posted 03 July 2013 - 01:52 AM
Mine was cout>>"Hello world!" :P/>/>

Mine too really. But as I said: this is the first one I release
Pharap #13
Posted 08 July 2013 - 01:25 AM
What IDE are you using?

I've done a bit of Win32 in Code::Blocks, but <windows.h> horrifies me.

I'll never understand why C/C++ has to be so full of defines and typedefs.
A lot of the time people are just redefining int.
Practically every type in windows.h that begins with h is just a typedef of handle, which is (eventually) a typedef of a 32-bit or 64-bit integer type.

I wish there was a more Visual Studio like IDE for C++.
Yes, I know VS can do C++, but with a broken intellisense I might as well use notepad++.


PS - I'm a horrible person:
most of the time I'd rather make a dll and create a C# interop wrapper for it than code in pure C++.
Mackan90096 #14
Posted 08 July 2013 - 04:02 AM
I'm using Code::Blocks on a Windows 7 64-bit machine
Pharap #15
Posted 08 July 2013 - 04:10 AM
Oh yay, same set up as me :D/>

Even though I'm hopeless with how to use Code::Blocks' extra features like setting up dlls and shizz.
I used the kernel mode driver template once - never used it again.
As for the compiler option menus, I think I'd rather have a command-line interface XD
GravityScore #16
Posted 08 July 2013 - 04:19 AM
I'll never understand why C/C++ has to be so full of defines and typedefs.
A lot of the time people are just redefining int.
Practically every type in windows.h that begins with h is just a typedef of handle, which is (eventually) a typedef of a 32-bit or 64-bit integer type.

I agree with this wholeheartedly, but I don't see why it should be the only reason to completely avoid C++ altogether. There're many other very nice windowing systems other than windows.h for C++, like QT, or even using SFML or SDL if you want to make a game. None of these redefine an int using a typedef (I think :P/>).

Plus Pharap, I'm curious. Your eternal hate for Java, does it originate from somewhere? I don't think such hate should go unjustified. I quite like Java's syntax and features (especially its standard library), although it is a bit too OOP heavy (classes for EVERYTHING is annoying), and runs so differently on each OS and hardware.

Also, command line FTW! :P/> IDEs are boring, do it the fun way :P/> Granted I'm on a mac, so it's probably easier than doing the same on Windows :P/>
Pharap #17
Posted 08 July 2013 - 04:38 AM
I agree with this wholeheartedly, but I don't see why it should be the only reason to completely avoid C++ altogether. There're many other very nice windowing systems other than windows.h for C++, like QT, or even using SFML or SDL if you want to make a game. None of these redefine an int using a typedef (I think :P/>).

Plus Pharap, I'm curious. Your eternal hate for Java, does it originate from somewhere? I don't think such hate should go unjustified. I quite like Java's syntax and features (especially its standard library), although it is a bit too OOP heavy (classes for EVERYTHING is annoying), and runs so differently on each OS and hardware.

Also, command line FTW! :P/> IDEs are boring, do it the fun way :P/> Granted I'm on a mac, so it's probably easier than doing the same on Windows :P/>

I've never been able to set up anything like that on Code::Blocks, so beyond writing myself a C# wrapper (which admittedly I probably could manage) it's more a matter of laziness. Plus to be fair, you're less likely to experience version hell with Win32. ie "this is version 1.5.5 and to run it you'll need this dll, anywhere from version 4.2 to 6.7 except for versions 5.1 and 4.6 because they had some odd bugs…" etc etc

The syntax isn't too different from C#, but there are so many things it lacks that I use regularly. Events, Delegates, Lambda expressions.
Even more down to earth features like Enumerations, Structs (that go on the stack, not the heap) and, dare I go there - unsigned integers!
Plus I'd have no clue how to interop C/C++ with it, if that's even possible. I might be wrong, but I don't believe it has support for generics.
Also, I prefer the syntax of C#'s properties to Java's getter and setter methods (less of a language feature, more of a discipline programmers must enforce themselves).
As an added bonus, I used netbeans' swing library designer once. The generated code was hell compared to windows forms designer's generated code (which is full commented and hidden away in an overrided Initialize method).
For a full list of features Java lacks that I like, see here: https://en.wikipedia.org/wiki/Comparison_of_C_Sharp_and_Java
(Yeah I know, I'm being cruel, but your fancy graphics libraries won't sway me :P/>)

Adding new command line options to windows is easy, I'm just too lazy to do it and too lazy to put up with remembering console commands. I can list files, I can change file associations, occasionally I look a command up and forget about it, tbh it's generally quicker to write throwaway programs for anything I'd want to use the command line for :P/>

PS - Forgot to mention, Steam doesn't think jar files are executable, and exe files can't be rummaged through with 7Zip.
lucidvizion #18
Posted 11 July 2013 - 12:08 PM
I wish there was a more Visual Studio like IDE for C++.
Yes, I know VS can do C++, but with a broken intellisense I might as well use notepad++.

When is the last time you've tried visual studio for c++? With VS2012 I've had zero problems with intellisense. I've tried many windows based C/C++ IDE's and visual studio blows them all out of the water.
Pharap #19
Posted 11 July 2013 - 11:08 PM
I wish there was a more Visual Studio like IDE for C++.
Yes, I know VS can do C++, but with a broken intellisense I might as well use notepad++.

When is the last time you've tried visual studio for c++? With VS2012 I've had zero problems with intellisense. I've tried many windows based C/C++ IDE's and visual studio blows them all out of the water.

Ah, I don't use 2012.
I'll get round to it eventually, but last I heard it's effort to set it up for XNA use.
If they finally fixed intellisense though (I know it's only two years, but it's been a long 2 years) I might try and get a copy.