You, know... optimization and what have you.
Printable View
You, know... optimization and what have you.
Well its mostly simple string processing. Pointers in C++ will help greatly with this. You can really cut corners in C++ with pointers.
Should I create my own textbox, or use a Windows Form Application and steal the TextBox class?
You should probably create your own. There are too many subtleties about the TextBox that you cannot override. Some will surely get in the way of implementing a syntax highlighter.
My fear is that I may be jumping into to big of an undertaking in regards to my lack of knowledge of c++
I'm scared that I will fail, and give up on C++ for a good while.
What's the point...er, I mean, why?
I have nothing to say, and this is surely the place to say it.
I have nothing to say, and this is surely the place to say it. This is indeed a duplicate. Odd that I can't intentionally duplicate, but can occasionally do so by accident.
This may be my latest post ever, but the last for tonight.
Did someone say C++? :bigyello:
I'm gonna give you all a crash course in C++ for those who have no balls to even touch it because they got a boner just thinking about VB.
Just for Beginners
Ok for your first lesson. Go ahead and open up a new empty C++ project. Call it whatever you want. Once your project has opened. Goto the left where your solution is down where it says Source Files. Right click it and Add > New Item...
Very good. Now click on C++ File (.cpp), name it Main, and click the Add button. Congratulations! Now you can start coding.
C++ Lesson 1: Hello World!
Ahhh everyones first program in any language they are new to. Unless you are too ambitious and start making a Halo clone right away. It all starts with the sub or function called main(). Every sub and function in C++ must be wrapped in { } tags. And almost every line of code must end in semicolons. The parenthesis tags however found immediately after the sub or function name ( ) could either be empty, or contain useful arguements such as variables or arrays.
This to those who are new to C++ is a Sub Routine. Yes VB lovers, it is the famous Private Sub main() End Sub! However if you want to create a function out of it, you could do this:Code:void main()
{
}
The data type int stands for Integer. Same Integer as in VB, but Long in VB6. Every function in C++ must have a return statement. To display "Hello World", I'm going to introduce you to a MessageBox. To even use a MessageBox, you will need to include a header that has it. C++ has 100s of built in headers containing 1000s upon 1000s of useful functions, subs, and apis. Plus you can even create your own headers, libraries, and such! The MessageBox is found in the windows.h header, and you will need to include it:Code:int main()
{
return 0;
}
c++ Code:
#include <windows.h> int main() { return 0; }
And now to call the MessageBox function!
c++ Code:
#include <windows.h> int main() { MessageBox(NULL, "Hello World!", "Message", MB_OK); return 0; }
Congratulations! You have made your first C++ program :bigyello:
I think that the biggest improvement that could be done to C++ is to remove the semi-colon to let the compiler know where the end of a line is. I'm sure 99.999999999999999999999999999999999999999999999999999999999999999999998% of computer's have enough memory to all for the new line to end the previous line.
Yeah, I agree. Semicolons are an anachronism. The other thing they could get rid of would be the case-sensitive nature. That was done because C dates from a time when computers didn't have enough reserve power to case correct. Those two features produce no value and only bugs. Both should be removed, but C/C++ is too sacred to tamper with in that way. The ANSI committees for each should address both issues, but probably never will.
I learned C++ initially. It was the only language that I ever set out to learn deliberately, and is the reason I prefer .NET over VB6, since I prefer to think in OO terms. However, you go through a lot more pain to get something accomplished in C++ than you do in VB.NET, so I'll stick with VB for now.
True, but you can't beat C++ for making ultra fast libraries. That's the main thing I love about it, though I haven't written a C++ function since moving to VB.Net but I'm sure the need will arise in the future. I mean there must be something the .Net Framework doesn't cover.
I'm about 18 months into building a C++ library that's needed for speed. Doing some intense file processing. My StringLibrary.cpp file is over 3000 lines of code :)
It's called from VB...
Starts out like this
Code:// StringLibrary.cpp : Defines the exported functions for the DLL application.
//
#include "stdafx.h"
#include <cmath>
// ****************************************** This is needed for wcout - should be removed
#include <iostream>
using namespace std;
// **************************************************************************************
//#include <vector>
//#include <string>
//#include <cmath>
//#include <algorithm>
//typedef std::vector<std::string> StringArray;
extern "C"
{
const int bit0 = 1;
const int bit1 = 2;
const int bit2 = 4;
const int bit3 = 8;
const int bit4 = 16;
const int bit5 = 32;
const int bit6 = 64;
const int bit7 = 128;
const int bit8 = 256;
const int bit9 = 512;
const int bit10 = 1024;
const int bit11 = 2048;
const int bit12 = 4096;
const int bit13 = 8192;
const int bit14 = 16384;
const int bit15 = 32768;
const int bit16 = 65536;
const int bit17 = 131072;
const int bit18 = 262144;
const int bit19 = 524288;
const int bit20 = 1048576;
const int bit21 = 2097152;
const int bit22 = 4194304;
const int bit23 = 8388608;
const int bit24 = 16777216;
const int bit25 = 33554432;
const int bit26 = 67108864;
const int bit27 = 134217728;
const int bit28 = 268435456;
const int bit29 = 536870912;
const int bit30 = 1073741824;
const __int64 bit31 = (__int64)1 << 31; // 2147483648
const __int64 bit32 = (__int64)1 << 32;
const __int64 bit33 = (__int64)1 << 33;
const __int64 bit34 = (__int64)1 << 34;
const __int64 bit35 = (__int64)1 << 35;
const __int64 bit36 = (__int64)1 << 36;
const __int64 bit37 = (__int64)1 << 37;
const __int64 bit38 = (__int64)1 << 38;
const __int64 bit39 = (__int64)1 << 39;
const __int64 bit40 = (__int64)1 << 40;
const __int64 bit41 = (__int64)1 << 41;
const __int64 bit42 = (__int64)1 << 42;
const __int64 bit43 = (__int64)1 << 43;
const __int64 bit44 = (__int64)1 << 44;
const __int64 bit45 = (__int64)1 << 45;
const __int64 bit46 = (__int64)1 << 46;
const __int64 bit47 = (__int64)1 << 47;
const __int64 bit48 = (__int64)1 << 48;
const __int64 bit49 = (__int64)1 << 49;
const __int64 bit50 = (__int64)1 << 50;
const __int64 bit51 = (__int64)1 << 51;
const __int64 bit52 = (__int64)1 << 52;
const __int64 bit53 = (__int64)1 << 53;
const __int64 bit54 = (__int64)1 << 54;
const __int64 bit55 = (__int64)1 << 55;
const __int64 bit56 = (__int64)1 << 56;
const __int64 bit57 = (__int64)1 << 57;
const __int64 bit58 = (__int64)1 << 58;
const __int64 bit59 = (__int64)1 << 59;
const __int64 bit60 = (__int64)1 << 60;
const __int64 bit61 = (__int64)1 << 61;
const __int64 bit62 = (__int64)1 << 62;
const int bitLowShort = (bit16 - 1);
const int bitShiftShort = 16;
const int bitHighShort = (bit31 - 1) - (bit16 - 1);
.
.
.
Oh...I have had a Witis sighting. As of this post he is viewing the "Bought my first gun thread"......Kid is sneaking around these days.
Now Witis is in the Golden Chair!!! Where will he be next!
Now he is back in "Bought my first gun"....Kid is really sneaking around!
The post race has fallen far down the list.
Now it's back at the top for a time.
Moar ???
I'm going to be out for a while :/
I just bought my Life and Health pre-licensing material.
So getting Life & Health licensed is at the top of my priority list.
And to answer you Niya...
YES! MOAR!
Out for a while because you are having a kid, or is that still out a ways?