|
You will have to read the documentation to find out which one suits your requirements best.
|
|
|
|
|
PCRE is a good option. It is based on the Perl regexe, although there are some minor differences under the hood (which I do not remember now). I wrote my own C++ template regex some years ago that gives me full control of behavior in my personal projects. I used other libraries like PCRE, for comparison, in my test bed, to test for speed and accuracy. That is why I know that there are some minor differences on what one considers valid and invalid syntax (implementation differences or programmers mind set - who knows?).
As for Cs ability to process strings or any other data type - it is very efficient. I used to be able to look a C-code and translate it, in my head, directly to the equivalent assembly code. What you are talking about is the standard C libraries, which were designed to provide only the simple low level functionality that programmers require to develop more complex algorithms (how many ways are there to write a 'strcmp' function?). It was left to others to provide libraries that required more than a simple 'for' or while 'loop' in their functions.
That being said, when I find my self doing contract work on old C-code, where I am not allowed to upgrade or use external libraries, I recreate some simple algorithms for parsing (hey its their money, so who am I to argue with a brick wall). Basically, I create equivalent functions for parsing sub-strings like the regex "\d*" or "[abd]" and wrap them in a function call - depending on what I am looking for. What little testing I have done has actually shown me that they were more efficient than using the MS implementation of regex (not a surprise).
Conclusion: C is the most efficient language I have ever work with - there is a reason that all of the modern operating systems, I have worked with, were written in C. (I have not checked lately, so it is possible that C++ snuck in their some were).
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence." - Edsger Dijkstra
"I have never been lost, but I will admit to being confused for several weeks. " - Daniel Boone
|
|
|
|
|
Dear Friends,
I am working on a legacy project where i do not have support for boost libraries or latest C++ version.
I need to identify the path of a file with given extension(*.abc) that is inside couple of folder.
as example i have path like C:\test
but the given file is found in c:\test\Application\SomeohterApplication\hello.abc
can someone help please ?
Thanks in advance.
vikas da
|
|
|
|
|
|
Hi,
I am trying to use Ribbon control in my outlook addin but could not find "
Microsoft Office xx.x Object Library in available type library.
I am using Microsoft Office 365 ProPlus. Please help.
|
|
|
|
|
Hi,
Freshly installed Windows 10 and VS2017 enterprise and doing migration from VS2010 to VS2017. Getting fatal error C1083: Cannot open include file: 'atlapp.h: No such file or direectory when i compile one of the project, even i have selected ATL and required options during VC2017 installation.
I would appreciate if anyone can suggest how to resolve this issue.
Thanks & Regards
Krishna Rao
|
|
|
|
|
|
Thank you very much Jochen Arndt. Now its working fine without any issues. Once again Thank you very much.
|
|
|
|
|
Hi
I need to create edit control on frame window.
please suggest to do so?
|
|
|
|
|
The appropriate forum for this question would be the C / C++ / MFC Discussion Boards[^].
However, a frame window should not contain controls. It is - as the name indicates - a frame for other windows which are CView based or - for the main frame - child frames which then have their views. So your edit control should be part of a CView based window.
|
|
|
|
|
Hello boys.
I use Visual Studio 2015.
Projekt setting: Use MFC in a Shared DLL.
For building from command line is used:
msbuild .\my_project.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64
All is working well, build runs OK.
I would like to ask you:
Is there a way how to switch (any parametr for msbuild) between Shared and Static MFC DLL?
for example:
msbuild .\my_project.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64 /p:ANYKEYWORD=Shared
or
msbuild .\my_project.sln /t:Rebuild /p:Configuration=Release /p:Platform=x64 p:/ANYKEYWORD=Static
or anything like that.
I can not find a way, how to build project from command line and switch both possibilities: "Use MFC in a Shared DLL" and "Use MFC in a Static DLL" without opening IDE and switching it there manualy in project setting.
Thank you for advices and help.
Lubomir
|
|
|
|
|
There are two solutions:- Create another configuration like ReleaseStatic which has the required setting configured
- Open the vcxproj file with a text editor and lookup the property for the setting you want to override (
UseOfMfc=Static with VS 2017 here)
Note also that the Visual Studio Discussion Boards[^] would be the appropriate forum for such questions.
|
|
|
|
|
Thank you for you advice.
Yes, It is a way, which is working well.
New configuration with config manager "StaticRelease" + change "Use Static DLL" from IDE.
Command line is then:
msbuild my_project.vcxproj /t:Rebuild /p:Configuration=ReleaseStatic /p:Platform=x64
Thank you again.
Lubomir
|
|
|
|
|
Bandwidth test - test memory bandwidth.
Especially important for PCIE capability. Different MB has different PCIE capability.
The CUDA adaptor performance is depend on the capability of PCIE. It could be the performance bottleneck.
On the following programming drills, the number of clock cycles necessary for computation and utilised memory bandwidth have to be computing.
(1) parallelization in the programs - using 256 threads
(2) improving the memory access modes
(3) testing the parallelization by using 512/1024
(4) utilizing BLOCKS in the computation
(5) utilizing shared memory
(6) improving the computation oerfdormance by using a Treesum algorithm
(7) resolving the memory band conflict issue, encountered in applying Treesum algorithm with the shared memory
|
|
|
|
|
Sorry, this site does not provide code to order.
|
|
|
|
|
|
Hi
I created a MFC application and created a horizontal scroll bar using CScrollBar calss as follows instead of default scroll bar.
if (CScrollView::OnCreate(lpCreateStruct) == -1)
return -1;
m_horzscrollbar.Create(WS_CHILD | WS_VISIBLE | SBS_HORZ | SBS_BOTTOMALIGN, CRect(0,0,100,100), this, 101);
SCROLLINFO scrollInfo = { 0 };
scrollInfo.fMask = SIF_ALL;
scrollInfo.cbSize = sizeof(SCROLLINFO);
scrollInfo.nMin = 0;
scrollInfo.nMax = 1000;
scrollInfo.nPage = 10;
scrollInfo.nPos = 10;
scrollInfo.nTrackPos = 10;
m_horzscrollbar.SetScrollInfo(&scrollInfo);
m_horzscrollbar.ShowWindow(1);
The above piece of code created a horizontal scroll bar. When i right click on the scroll bar, it displaying a context menu with some options like page left, page right, scroll here, scroll left and scroll left.
How can i stop this default context menu in my application since this is not required for me.
Any help is appreciated.
Thanks.
|
|
|
|
|
|
I have tried this but its not working. One more wired problem i face is, this context menu is not appearing in debug mode, only in release mode this menu is appeared.
|
|
|
|
|
Not tested but should work:
Derive your own CScrollBar based class and implemement OnContextMenu() as empty function. Then the default implementation should not be called anymore.
|
|
|
|
|
Thanks. The trick worked.
|
|
|
|
|
Hello All,
I am working on a legacy application , i am seeing it has some .Def file that is using to generate some cpp file and its used inside the same project.
Can somebody help me in understanding how to invoke .Def file.
vikas da
|
|
|
|
|
|
Thank you so much
Richard MacCutchan
for reply. so project looks like this,
project structure looks like this.
it has a def file that has function to be exported,
it has a generator.cpp that generates x.cpp file
it has x.cpp file that expose some function that is used in other projects
now first i have to use .def file to invoke methods in Generator.cpp to generate the x.cpp file and then compile the project so that the generated dll can be used by other application.
what i am not aware of ...how to invoke Generator.cpp ...is there any parameter that i can tweak during compilation time so that it generate the CPP files first and then compile the DLL or any other possible way
Thank you so much in advance
vikas da
|
|
|
|
|
I am sorry but it is impossible to guess what the build process is supposed to be. You need to find the person who set the project up in the first place.
|
|
|
|