|
-
Jul 25th, 2013, 03:07 PM
#50321
Re: Post Race!
You, know... optimization and what have you.
-
Jul 25th, 2013, 03:14 PM
#50322
Re: Post Race!
Well its mostly simple string processing. Pointers in C++ will help greatly with this. You can really cut corners in C++ with pointers.
-
Jul 25th, 2013, 03:16 PM
#50323
Re: Post Race!
Should I create my own textbox, or use a Windows Form Application and steal the TextBox class?
-
Jul 25th, 2013, 03:18 PM
#50324
Re: Post Race!
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.
-
Jul 25th, 2013, 03:27 PM
#50325
Re: Post Race!
My fear is that I may be jumping into to big of an undertaking in regards to my lack of knowledge of c++
-
Jul 25th, 2013, 03:27 PM
#50326
Re: Post Race!
I'm scared that I will fail, and give up on C++ for a good while.
-
Jul 25th, 2013, 06:01 PM
#50327
Re: Post Race!
 Originally Posted by Niya
Well its mostly simple string processing. Pointers in C++ will help greatly with this. You can really cut corners in C++ with pointers.
You could give him a few pointers, perhaps?
My usual boring signature: Nothing
 
-
Jul 25th, 2013, 06:02 PM
#50328
Re: Post Race!
What's the point...er, I mean, why?
My usual boring signature: Nothing
 
-
Jul 25th, 2013, 11:53 PM
#50329
Re: Post Race!
I have nothing to say, and this is surely the place to say it.
My usual boring signature: Nothing
 
-
Jul 25th, 2013, 11:54 PM
#50330
Re: Post Race!
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.
My usual boring signature: Nothing
 
-
Jul 26th, 2013, 12:05 AM
#50331
Re: Post Race!
This may be my latest post ever, but the last for tonight.
My usual boring signature: Nothing
 
-
Jul 26th, 2013, 01:15 AM
#50332
Re: Post Race!
Did someone say C++? 
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.
-
Jul 26th, 2013, 01:32 AM
#50333
Re: Post Race!
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:
int main()
{
return 0;
}
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:
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
-
Jul 26th, 2013, 10:50 AM
#50334
Re: Post Race!
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.
-
Jul 26th, 2013, 11:52 AM
#50335
Re: Post Race!
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.
My usual boring signature: Nothing
 
-
Jul 26th, 2013, 11:53 AM
#50336
Re: Post Race!
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.
My usual boring signature: Nothing
 
-
Jul 27th, 2013, 05:32 AM
#50337
Re: Post Race!
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.
-
Jul 27th, 2013, 06:04 AM
#50338
Re: Post Race!
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);
.
.
.
Last edited by szlamany; Jul 27th, 2013 at 06:11 AM.
-
Jul 28th, 2013, 05:23 AM
#50339
Re: Post Race!
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.
-
Jul 28th, 2013, 05:25 AM
#50340
Re: Post Race!
 Originally Posted by szlamany
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);
.
.
.
If its starts like that, I can imagine what the rest must look like
-
Jul 28th, 2013, 05:26 AM
#50341
Re: Post Race!
Now Witis is in the Golden Chair!!! Where will he be next!
-
Jul 28th, 2013, 05:29 AM
#50342
Re: Post Race!
Now he is back in "Bought my first gun"....Kid is really sneaking around!
-
Jul 28th, 2013, 08:01 AM
#50343
Addicted Member
Re: Post Race!
 Originally Posted by Niya
Kid is sneaking around these days.
 Originally Posted by Niya
Kid is really sneaking around!
Must have been someone else.
All men have an inherent right to life, the right to self determination including freedom from forced or compulsory labour, a right to hold opinions and the freedom of expression, and the right to a fair trial and freedom from torture. Be aware that these rights are universal and inalienable (cannot be given, taken or otherwise transferred or removed) although you do risk losing the aforementioned rights should you fail to uphold them e.g Charles Taylor; United Nations sources: http://www.un.org/en/documents/udhr/, http://www.ohchr.org/EN/Professional...ages/CCPR.aspx. Also Charles I was beheaded on the 30th of January of 1649 for trying to replace parliamentary democracy with an absolute monarchy, the same should happen to Dr Phil and Stephen Fry; source: http://www.vbforums.com/showthread.p...ute-Monarchism.
The plural of sun is stars you Catholic turkeys.
-
Jul 28th, 2013, 08:34 AM
#50344
Re: Post Race!
 Originally Posted by Witis
Must have been someone else. 
Well it was kinda dark.....Could have sworn it was you.
-
Jul 29th, 2013, 11:44 AM
#50345
Re: Post Race!
The post race has fallen far down the list.
My usual boring signature: Nothing
 
-
Jul 29th, 2013, 11:45 AM
#50346
Re: Post Race!
Now it's back at the top for a time.
My usual boring signature: Nothing
 
-
Jul 29th, 2013, 12:29 PM
#50347
-
Jul 29th, 2013, 12:49 PM
#50348
Re: Post Race!
I'm going to be out for a while :/
-
Jul 29th, 2013, 12:49 PM
#50349
Re: Post Race!
I just bought my Life and Health pre-licensing material.
-
Jul 29th, 2013, 12:50 PM
#50350
Re: Post Race!
So getting Life & Health licensed is at the top of my priority list.
-
Jul 29th, 2013, 12:50 PM
#50351
Re: Post Race!
And to answer you Niya...
YES! MOAR!
-
Jul 29th, 2013, 01:23 PM
#50352
Re: Post Race!
Out for a while because you are having a kid, or is that still out a ways?
My usual boring signature: Nothing
 
-
Jul 29th, 2013, 01:50 PM
#50353
Re: Post Race!
MOAR!!!!
-
Jul 29th, 2013, 01:50 PM
#50354
-
Jul 29th, 2013, 01:51 PM
#50355
-
Jul 29th, 2013, 01:52 PM
#50356
-
Jul 29th, 2013, 01:53 PM
#50357
-
Jul 29th, 2013, 01:54 PM
#50358
-
Jul 29th, 2013, 01:55 PM
#50359
-
Jul 29th, 2013, 01:55 PM
#50360
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|