|
NiceNaiduhe problem is i have never worked on STL collections before.
You should give the STL a good look. You can't master C++ without being familiar with it.
Steve
|
|
|
|
|
That's true. I will go through a good book of STL.
Is there any specific book available ?
Thanks in Advance.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
This[^] book is a good one.
Steve
|
|
|
|
|
Thanks Steve.
Appu..
"Never explain yourself to anyone.
Because the person who likes you does n't need it.
And the person who dislikes you won't believe it."
|
|
|
|
|
hii
i have created one windows forms application in vc++.net 2005 .
where i want to use the vector
i included
#include <vector>
also using namespace std;
declare the vector as
std::vector<int>vFile;
int m_Number= 5 ;
vFile.pushback(m_Number);
i am getting the linker error like
Error 1 error LNK2028: unresolved token (0A000380) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) referenced in function "public: class std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> > & __thiscall std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> >::operator+=(int)" (??Y?$_Vector_const_iterator@UFileNames@@V?$allocator@UFileNames@@@std@@@std@@$$FQAEAAV01@H@Z) 9julyMATDOT.obj
Please help me for resolving this....
Thanks in advance ....
Anamika
|
|
|
|
|
That's a little bit odd. The function it can't find CrtDbgReportW is part of the C Runtime Library (various MSVCRT.dll and related bits depending on version).
Check that your project is set to use it, Properties, Configuration Properties, C/C++, Code Generation, Runtime Library. Try the Multi threaded Debug /MTd option or one of the others if that gives you more/different errors.
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
thanks for your reply....
i tried changing the runtime libary to Multi threaded Debug /MTd but of no use .....
|
|
|
|
|
In that case it looks like it might me an include path issue. I still think it odd that this STL code which is distributed as source seems to be requiring the definition of a C Runtime function that isn't part of the standard interface in order to compile. Something subtle/nasty is going on here. Are you trying to mix code from VC6 with VS2002 or later? Do you have the C Runtime source installed with your compiler (it's optional)? I'd start by checking where your build is pulling its STL and CRT header files from. Perhaps one is coming from a much later SDK and the other from a compiler installation
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
I'm working on a linked list class for my latest project and i would like to be able to access any of it's data members just like an array. Is it possible to override the [] operator so that I can do this? If it's not possible, what would be the next easiest way to access my linked list's data members?
|
|
|
|
|
Yes it is possible to override the [] operator. I haven't got an example in front of me at the moment but it is very roughly:
<br />
CMyElement* CMyArray::operator[]( int iIndex )<br />
{<br />
}<br />
"The secret of happiness is freedom, and the secret of freedom, courage."
Thucydides (B.C. 460-400)
|
|
|
|
|
Thanks, I'll work on this :]
I'll post up some code later on when I've got it working.
|
|
|
|
|
On a side note: why don't you use some existing class for that ? std::list or std::vector ?
|
|
|
|
|
I didn't know they existed! :P
If I can't work this out then I'll take a look at them.
|
|
|
|
|
Sauce! wrote: If I can't work this out then I'll take a look at them.
You should definitively take a look at them (maybe not for this project but at least for the next one). I agree, it looks quite difficult at a first sight but the STL is very usefull. There are some good container classes (list, vector, map, ...) which have been tested by a lot of people. So, you don't need to reinvent the wheel and come out with something that need testing, debugging and is not flexible enough to be reused.
|
|
|
|
|
I didn't take a very in-depth look at them but from what I saw I didn't think It would be as easy to do with them what I wanted but I'll take another peek at it tonight and see what I can get out of it.
|
|
|
|
|
Hi,
I need to add many buttons to groupbox and it should get the scrollbar if the buttons dont fix in to the groupbox. In .NET we can do it through Panel control. But please tell me how to do it in MFC.
|
|
|
|
|
Anybody plz help to know the method of reding very fast from mshflexgrid in MFC.The grid contains very huge string .the total rows in that is maximum of 25000.Anybody plz supply a solution for this .
vijith vijayan
|
|
|
|
|
You better make a data model object which is only displayed in the grid.
Greetings from Germany
|
|
|
|
|
Thanks for the reply .Could u plz elobrate your solution.i didnt get it .If possible provide me a sample code .
vijith vijayan
|
|
|
|
|
hi ,
Using VC++.....i was able to read data file with different columns..but i want to extract each individual column for furthur processing...my data files are tsv format(tab separated).
my data in tsv is like this
TheTime Heart_Rate spo2 belt acc_x acc_y acc_z temp
3.956.860.418.777 1.025.091 0.9678570 -0.7526630 -1.448.000 -1.383.487 -1.103.595 -2.810.811
3.956.860.418.783 1.024.589 0.9676060 -0.8066331 -1.451.012 -1.383.487 -1.103.595 -2.812.317
3.956.860.418.789 1.024.589 0.9676060 -0.9462026 -1.447.247 -1.384.240 -1.106.607 -2.810.560
3.956.860.418.795 1.024.338 0.9673550 -1.076.986 -1.446.996 -1.385.746 -1.102.591 -2.816.082
how do i go about extracting each column??
thnkx
|
|
|
|
|
If you're using MFC then have a look at CString::Tokenize [^] method. On the other hand, without MFC , strtok [^] maybe the way to go.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
If you are using MFC, have you looked at AfxExtractSubString() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
thank you pallini and david
|
|
|
|
|
I wish to capture some live video and preview, but PlayVideoCap example that i downloaded from Windows SDK, (DirectX) just doesn't do the job. It compiles and there is no error messages. video preview show black screen,although avi frame capturing works fine.. and video capture with VideoCap works. I wish to capture from the Capture Card as well and currently using a surveillance camera.
I am beginner in video programming C++. What possibilities of mistakes there may be? Any advice please! Any other sample codes??
Cheers,
kel
any help will be appreciated.
|
|
|
|
|
go to this link and ask for help "www.google.com"
|
|
|
|