|
CObject ... DECLARE_SERIAL .... Serialize ... IsStoring ... are the clues
Regards,
Swathi
"a child will grow up to become an adult, but you can never stop the adult from acting like a child"
|
|
|
|
|
I found this series of articles[^] quite interesting.
|
|
|
|
|
I am looking for a library, using which one can access philips 9400 devices. Library with read/write/download/delete files to/from device compatibility. Please help me. It's very urgent for me.
my email id:
amresh.kumar@photoninfotech.net
|
|
|
|
|
hi can we get the boot priority configuration in windows through mfc code? i am having first bootable as harddisj, second as some external device and third on as usb drive. how to get this through our mfc code?.pls help me
|
|
|
|
|
Hi all:
I am having a problem here:
void WordTable::addWord(string newWord, streampos pos_newWord){}; is the function signature of the function "addWord", which is a member of class "WordTable".
It receives two input arguments, one string "newWord" anther one streampos "pos_newWord".
WordTable has a private variable "table" which is of type "map". It is defined as:
map<string, vector<streampos="">> table;
When "addWord" receive two arguments, I use:
this->table.insert(make_pair(newWord, ((this->table).second).push_back(pos_newWord)));
to store the variables into a table. But I keep getting error messages telling me "second is not a member of map<_Key, _Val."
Can anyone help?
Thank you
|
|
|
|
|
I don't understand what you are trying to do. And your code doesn't display nicely because you didn't select the code tag.
second will only work on iterators, not on the map itself so what are you trying to do there ?
|
|
|
|
|
Hi:
Thank you for your reply.
Basically, what I try to do is to read from a text file and put every word and their associated positions in the file into a container, "table" of map type.
"table" is defined as:
public:<br />
typedef vector<streampos> OccurrenceList;<br />
private:<br />
typedef map<string, OccurrenceList>::iterator WordIterator;<br />
map<string, OccurrenceList> table;<br />
public:<br />
WordTable(void);<br />
void addWord(string word, streampos pos);
"addWord" is defined as:
void WordTable::addWord(string newWord, streampos pos_newWord)<br />
{<br />
if (this->table.empty()) {<br />
this->table.insert(make_pair(newWord, ((this->table).second).push_back(pos_newWord)));<br />
}
What I try to achieve is: when a new word is read from the file, I will store the word itself (as a string) and its position in the file into "table".
Thank you
|
|
|
|
|
What are you trying to do here:
((this->table).second)
A map doesn't have any member called second, only iterators have. So there is something wrong there.
Also, how is your map declared (when using < and >, you need to replace them by the symbols next to the code tag). Can't you simply do something like that:
table[newWord] = pos_newWord;
And what happens if a same word appears several time in the file ?
|
|
|
|
|
Hi,
I think your are trying to add multiple occurrence of the word in a vector list in the corresponding word entry.
you may do like this,
<br />
void WordTable::addWord(string newWord, streampos pos_newWord)<br />
{<br />
map<string, OccurenceList>::iterator Iter;<br />
Iter = table.find(newWord)<br />
if (Iter == table.end())<br />
{ <br />
OccurenceList list;<br />
list.push_back(pos_newWord);<br />
table.insert(make_pair(newWord, list));<br />
}<br />
else<br />
{<br />
Iter.second.push_back(pos_newWord);<br />
}<br />
.<br />
.<br />
.<br />
In your code I think your are also inserting multiple times the same word.
And Also you may make this more simpler if your are using multimap
<br />
<br />
multimap<string, streampos> table;<br />
then you simply needs to do <br />
table.insert(make_pair(newWord, pos_newWord));<br />
Best Regards
-- modified at 0:12 Friday 1st June, 2007
|
|
|
|
|
Hi:
This is exactly what I did, (did not use multimap()) and it worked.
Thank you very much.
|
|
|
|
|
|
Maybe reporting the exception text will help.
BTW, have you a FilterKey field in your table. Do you want to popolate the combo (i.e. add items) or set its text?
BTW2: wrong forum?
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 stinks like managed code on a wrong forum...
as your question on the right board buddy
|
|
|
|
|
|
Hi all,
I have made sdi application. In that i have made a dialog box derived from CFormView. I want to change dialog box colour to white but no EraseBackgrnd function is coming when i open Class wizard
Can anybody help me in this?
Thanks in advance.
|
|
|
|
|
neha.agarwal27 wrote: no EraseBackgrnd
Look for WM_ERASEBKGND .
|
|
|
|
|
Hello All,
I am creating a shared addin for word application. now i have to add toolbar and menu bar to word application.
if any one have idea about this than please share with me.
Thanks
|
|
|
|
|
You will have to implement IDTExtensibility interface and in IDTExtensibility::OnConnection you have to add the Toolbar Button and Menu items.
Search for "office addin " in google you might find some article about how to create Addins.
Regards,
Swathi
"a child will grow up to become an adult, but you can never stop the adult from acting like a child"
|
|
|
|
|
How to get XP style window ( GUI ) using MFC????
Thanx n Advance.....
|
|
|
|
|
arshadkc wrote: How to get XP style window ( GUI ) using MFC????
Add this one line to your .rc file, open it in a text editor.
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "YourApp.exe.manifest"
YourApp.exe.manifest should be your application's manifest file.
|
|
|
|
|
hi
anyone knows how can i make VC not to continue code generation after a specified number of errors/warnings?!
TC about 16 years earlier had this capability as well as nested comments!
MS isn't going to respect its users needs?!
|
|
|
|
|
it's still like that AFAIK...!
|
|
|
|
|
How can i access non static members in a static member function
thanks
|
|
|
|
|
no, because a static member has no this pointer, so it doesn't know a particular instance of the class
|
|
|
|
|
You have to explicitely pass such members as function arguments.
(Of course you can also pass the whole object the members belonging to).
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.
|
|
|
|