C++Extra (Add-on) (New!) (Please try)

closed account (9jNRX9L8)

I have created my own custom little add-on like thing for c++, called C++Extra it adds lots of new features!

C++Extra (Version 0.01)
http://www.filedropper.com/cextra

I hope it helps you alot! Please reply feedback and anything I should add!

Planned Features:

Make the load() command be customizable, for example
a border around it or not.

var() - You type the variable name between ( and ) and
it will created a variable called that.

print() - It is cout but more easyer to type, just type text
in the ( and ).

wait() - Type a number of mili-seconds to wait between
( and ). It basically waits for the number of mili-seconds.


Current Features:

clear() - Clears the console
load() - Adds a short, but effective loading screen
Last edited on
Nothing impressive - Nobody's going to use that.
People doesn't usually clean the console (And anyways that's now how you clean the console) neither anybody's going to make a user wait while a Sleep call is performed.

It is also OS-dependent, and badly optimized (as you have multiple lines calling std::cout::operator<< with an empty C-style string, where it could have been shortened a lot more) and it clean on very large consoles.

The "var" idea is useless and only forces you to type more text than the actually required.
The "print" idea already exist and is from the C library (very, VERY old!) and is called printf.
If you want to avoid printf, you can also fwrite to stdout (not suggested).
The "wait" idea already exists in C++11, and includes compatibility for Milliseconds, seconds, minutes, hours, days and even more (You can create even your own custom "time currency" to use in existing code).

Instead of beginning to make your own things looking like they're awesome, google to check their side effects or if a better alternative already exists.

Your load function can be shortened to something on the line of
cout << endl << endl << endl [...]
Last edited on
closed account (9jNRX9L8)
I did NOT say it was the best, I only just started devolping it so its not going to be the worlds greatests c++ add-on. The var is is quite good seeing as it will support char, int, short, long. So you don't type double text; short text; char text; and stuff it will support char and short etc.

Print idea is quite good. Instead of typing something like:

cout << "Hey" << endl;

You can type:

print(Hey);

Also it is form a old version of the C libary
1. That is C not C++ learn the difference.
2. That is a old version...


Typing:

load();

Is better than typing something like:

cout << endl << endl << endl [...]


Most of those things save: time, memory usage and add more cutomization.



P.S
Did I say please reply with moans and how bad it is...
Last edited on
closed account (9jNRX9L8)
Just to note there are 5 typos in your reply...
Toggy11 wrote:
Did I say please reply with moans and how bad it is...

You haven't said I cannot moan either. Just to note there's an incongruence in your reply.
Toggy11 wrote:
The var is is quite good seeing as it will support char, int, short, long. So you don't type double text; short text; char text; and stuff it will support char and short etc.

Is it going to become something like
create_double(myvar) ?
This breaks intellisense/code completion on some IDEs.

Toggy11 wrote:
Print idea is quite good. Instead of typing something like:

cout << "Hey" << endl;

You can type:

print(Hey);


Go ahead and print a ')' character.
You better use the C version instead.
Toggy11 wrote:

Also it is form a old version of the C libary
1. That is C not C++ learn the difference.
2. That is a old version...

C library is included in most C++ environments.
You yourself use cstdlib and tell me C is old?
Toggy11 wrote:

Typing:

load();

Is better than typing something like:

cout << endl << endl << endl [...]

I meant, the code INSIDE load could look like that, instead of being full of lines and instead of couting empty strings (calling a operator<< function wasting CPU time).
Toggy11 wrote:

Most of those things save: time, memory usage and add more cutomization.

Neither time, memory usage and customization are improvements.
They, instead, are restricted.
By calling a function:
1. You waste time for stack operations
2. You waste stack space
3. You can't customize everything as you would regularly
Please do not double-post, you already have a thread here:
http://www.cplusplus.com/forum/lounge/113439/
Topic archived. No new replies allowed.