|
Hi All,
I have to handle text files of larger sizes ranges from 10GB and more which are exported from some application softwares. The text files contains the required information scattered throughout the file. I need to gather all those information in a particular format to do further analysis. Say for example, if the input file contains as following:
#10 // time stamp 10
0!
1(
1=
#15 // time stamp 15
1!
0:
I have to gather the information as,
! 10 0 15 1
( 10 1
= 10 1
: 10 0
So please suggest me how to store the above gathered information either as a vector, class arrays, or anything else like database e.t.c., The information surely occupies size larger than 10GB. And i have to access the gathered information for further progress.
With Regards,
Sangeetha.
|
|
|
|
|
I would not read the whole file into one data type. I would push it into an arraylist and pop it out after I saw the timestamp and write it to the new file.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
hi all, i have made winform application using vs 2005,when i call one form from another form then error is displayed that undeclared class member,
both classes have same namespace, i have compiled program with /clr option but still gives error when i declare the object of class.
Regards.
Tasleem Arif
|
|
|
|
|
Sounds to me like if you pasted your code, we'd be able to see your error and help you.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hey,
I'm trying to compile a project and I am getting the following errors:
<br />
#define BUFF 5000<br />
const SIZE_T m_cbStrBuffer = 5000;<br />
const WNDID_LIMIT = 1024;<br />
<br />
<...>"And so on"<br />
<br />
</...>
The compiler is complaining about both 'const' lines...
Anyone have any idea what I'm not doing right...?
let me know,
Cheers,
|
|
|
|
|
peepsicola wrote:
The compiler is complaining about both 'const' lines...
My psychic abilities are failing today....what are the error messages??????????
The second const line has no data type specified.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
The actual error message is as follows:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
and yes, it is refering to the second 'const' line...
|
|
|
|
|
peepsicola wrote: const WNDID_LIMIT = 1024;
You're declaring a variable - the variable needs a type,
not just a name. For example, to make WNDID_LIMIT an int...
const int WNDID_LIMIT = 1024;
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
VC6 used to assume int. In fact, I had to work on some code that had methods which didn't specify a return type, it assumed int, code that called those methods assumed the int was an error code, and branched based on the result, but the actual code didn't return anything.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
|
I am using a C++ Dll in C# Window Application.For this I am trying to write a managed wrapper in C++/CLI so that it can consume the native C++ Dll and expose the methods to the C# application.While doing so I am facing a problem to marshal multidimensional character array.
I have an structure like
struct TouAnalysis
{
int x;
char TouName[500][5];
}
I am creating a corresponding structure in C#
[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Ansi,Pack=8)]
public struct TouAnalysis
{
[MarshalAs(UnmanagedType.I4)] public int x;
}
The problem is How do I define the data type for the character array char TouName[500][5] in C# structure.
I would be a great help if anybody can help on this or can tell any alternate way of using native C++ structures in Managed code
Kamal
|
|
|
|
|
Maybe something like
[MarshalAs(UnmanagedType.LPArray, SizeConst=2500)] public byte[] TouName;
I'm no C# programmer, but I'm guessing you'll need/want to marshal those chars
as Strings unless they are really just signed bytes.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How to marshal them as String??
|
|
|
|
|
Hi,
I have a cli::array that I need to convert to a Byte[] (unsigned char[]).
I have code as follows:
Byte ImageBytes []= Convert::FromBase64String(structParam->m_sValue);
m_sValue is a String ^.
However, this gives me the following error:
error C2440: 'initializing' : cannot convert from 'cli::array<type,dimension> ^' to 'unsigned char []'
I have looked everywhere, but have not found a way to do this. I am sure I missed it somewhere.
How would this be done?
Thanks!
----------------------
William Dicks
|
|
|
|
|
WilliamD wrote: Byte ImageBytes []= Convert::FromBase64String(structParam->m_sValue);
should be:
array<Byte>^ ImageBytes = Convert::FromBase64String(structParam->m_sValue);
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
The Common Language Specification (CLS) specifies that pointer types must be replaced by System::IntPtr so that they will be usable by other .NET languages.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi,
We're currently implementing a game application using directX with MFC. We have came across the option to use windows forms (in C++) which will simplify the GUI dev. Since one of the requirements is to support Win2000 clients (estimated around 5% of the global PC market!) the trade off is the CLR redist package that we'll have to bring along.
My questions are: did anybody wrote windows forms in c++ with DirectX? If so, what are the cons and pros? And in general is it a good idea to use managed c++ with directX.
I'll appriciate experienced answers.
Thanks in advance.
Snir_ya.
|
|
|
|
|
I haven't done any DirectX work in managed C++, but I am currently converting an old MFC/OpenGL app of mine into managed C++ with OpenGL. If you're worried about performance loss in switching to a managed environment, I haven't noticed any. And yes, it is SO NICE to be able to use .NET for rapid GUI development!
|
|
|
|
|
hello,
having a problem with an application that I'm trying to build in release mode. it builds, but when starts it gives me an error about the internal state of the program being corrupted ....
it is a C++/CLI application that works well in debug mode.
internally it uses std::strings to pass as parameters to the C++ module.
when working with std::strings in CLI they always have the size above 10000 elements, and a .clear() does not have any effect.
using VS2005
any ideas ?
|
|
|
|
|
as a response to my question:
the C++ module needs to be build in release mode with "multi threaded debug dll" option otherwise it does not work.
|
|
|
|
|
How are you marshaling System::String to std::string?
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
First I have to apologize for my bad english.
I now working as a audio/graphics programmer for my professor.
My past project is a game/speech recognition program that use following library.
- the launguage used is c++ (vc++ 6.0)
- MFC (for database front end / GUI)
- OpenGL (for 3d graphics rendering)
- ADO (for MS ACCESS database programming)
- port audio (for audio capturing)
which is working fine ,but lately my clients request something that not easily implement in MFC (compare to what I have done in c#) like On the fly dialog font changing , heavily dialog/control skinning .
So is it a good Idea to learn c++/cli ? Since I really want to use those
simple GUI implementation method in .NET but still want to use old c/c++ library
Some questions :
1.is it possible to use unmanaged c++ class/object in managed scope ?
2.Is there a built in audio capturing in .NET library ?
3.does .NET natively support UNICODE ?
4.any other suggestion ?
Thank in advance
|
|
|
|
|
xanagan666 wrote: 1.is it possible to use unmanaged c++ class/object in managed scope ?
I think so, but I would try and avoid it; working with .NET objects is easier for me.
xanagan666 wrote: 2.Is there a built in audio capturing in .NET library ?
Don't know. Maybe in DirectX?
xanagan666 wrote: 3.does .NET natively support UNICODE ?
Yes, alls its chars and strings use it all the time.
xanagan666 wrote: 4.any other suggestion ?
You can convert unmanaged C++ code to managed C++, don't know how difficult that is
(my experience is mainly with C# and unmanaged C, interfaced thru P/Invoke).
You can mix managed C++ and C# (but not in the same DLL), so if you succeed in
encapsulating your existing C++ code, you could do the new stuff (such as GUI) in C#
if you prefer that.
|
|
|
|