|
cdpace wrote: unresolved external symbol _sqlite_freemem
This indicates that either you have spelt this function name wrongly, or the libary that includes the function has not been added to your project. Check that you have added all the pre-requisites for CppSQLiteWrapper . I don't know where you got this code from but it may be quicker if you go back to the source and ask your question there.
|
|
|
|
|
Hi,
I understand we can concat strings using + operator. for example,
string strarray[20];<br />
string rule= "1 ";<br />
string word = "; hello world";<br />
for(int i=0;i<10;i++){<br />
strarray[i] = rule + word;<br /> }
however if i do this, it prompt an error:
<br />
string strarray[20];<br />
for(int i=0;i<10;i++){<br />
strarray[i] = "Rule " + "; hello world";<br />
}<br />
how do i go about doing this? tks
|
|
|
|
|
nuttynibbles wrote: strarray[i] = "Rule " + "; hello world";
Because in that case you try to concatenate char arrays, not std::string. Thus, there's no + operator overloading for char arrays. The + operator is overloaded by the string object, so it means the left operand of the + has to be a string, not a char array.
|
|
|
|
|
Either #1 or 2 below should work... You get an error since you the + operator is not defined between two char arrays
1) strarray[i] = std::string("Rule ") + std::string("; hello world");
2) strarray[i] = "Rule ";
strarray[i].append("; hello world");
|
|
|
|
|
WOW im very please with the SUPER quick reponse from both of you. TK you so much. im gonna go with the 2nd solution tho
however, tks to both again!!!!
|
|
|
|
|
btw, is there a function in c++ to search for duplicate items in an array without doing a for loop?
|
|
|
|
|
No. You would either use a structure that prevents duplicates (e.g. .NET SortedList in C# --- not sure if there is one in C++) or use qsort, std::sort, and then identify duplicates.
|
|
|
|
|
hello I have COM DLL and I want to include it in my code. I got its IDL file from OLE VIEW . Saved it to disc and now I want to make it into a tlb file which when imported in my project will generate a .tlh and .tli file and thus then I will be able to use its using CO create instance as only then I will have the interfaces available through it avaialable to me ...
Does some body know any other method or cann some body guide mw HOw this can be done either using midl.exe or through visual Studio
Regard,
Kushagra
|
|
|
|
|
check out using the #import directive
'g'
|
|
|
|
|
can i change computer name, motherboard sn, hard disk sn? if i can please tell me how?
thanks
|
|
|
|
|
You can change the computer name using the SetComputerName API.
As for the other two, it will really depend on whether the manufacturers support this, which is very unlikely.
|
|
|
|
|
thanks alot but about hard disk serial number changing could you explain more?
thanks
|
|
|
|
|
Find out what they are and then search the registry for the values.
|
|
|
|
|
Take a look at the Win32 classes[^] for the information that is available.
|
|
|
|
|
I want to display the records of a particular table in listview.
I am able to display simple text in the columns of the listview but i am unable to display records from the database.
i tried a for loop 4 that bt it dint help.
Can smebody help me with the code.....
Thanks in advance.
|
|
|
|
|
If you can post your code, somebody will help you get it right.
|
|
|
|
|
An example can be found here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
M able to display sme text in the list view. M writing the code 4 that. Smebody help to modify that code to insert data from database. The code is:
CDialog::OnInitDialog();
{
LVCOLUMN lvColumn;
LVITEM lvItem;
int nItem;
m_list.SetExtendedStyle(LVS_EX_CHECKBOXES);
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 100;
lvColumn.pszText = "ID";
m_list.InsertColumn(0, &lvColumn);
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 150;
lvColumn.pszText = "Name";
m_list.InsertColumn(1, &lvColumn);
lvColumn.mask = LVCF_FMT | LVCF_TEXT | LVCF_WIDTH;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 200;
lvColumn.pszText = "Description";
m_list.InsertColumn(2, &lvColumn);
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 0;
lvItem.iSubItem = 0;
lvItem.pszText = "Anoop";
nItem = m_list.InsertItem(&lvItem);
m_list.SetItemText(nItem, 1, "a");
m_list.SetItemText(nItem, 2, "b");
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 1;
lvItem.iSubItem = 0;
lvItem.pszText = "Roger A. Miller";
nItem = m_list.InsertItem(&lvItem);
m_list.SetItemText(nItem, 1, "Footballer");
m_list.SetItemText(nItem, 2, "Tennis");
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 2;
lvItem.iSubItem = 0;
lvItem.pszText = "Marie-Julie W. Gross";
nItem = m_list.InsertItem(&lvItem);
m_list.SetItemText(nItem, 1, "Student");
m_list.SetItemText(nItem, 2, "Boxing");
lvItem.mask = LVIF_TEXT;
lvItem.iItem = 3;
lvItem.iSubItem = 0;
lvItem.pszText = "Ella Pius Roger";
nItem = m_list.InsertItem(&lvItem);
m_list.SetItemText(nItem, 1, "Architect");
m_list.SetItemText(nItem, 2, "Ping-Pong");
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
Thanks in advance....
|
|
|
|
|
hi every one!!
i need a topic for our research proposal!
can i ask suggestion from you?
|
|
|
|
|
The meaning of Life
|
|
|
|
|
ahm what i mean is a topic for IT research proposal!!
hehe..im sorry.. i forgot to specify!!
|
|
|
|
|
And my joke icon was to suggest that your question is somewhat ridiculous. Nobody here has any way of knowing what might be a good research project for you.
|
|
|
|
|
ahm.. all i need here.. is just a suggestion!!!
|
|
|
|
|
cool_joy2 wrote: ahm.. all i need here.. is just a suggestion!!!
Your question makes no sense, I have no idea of your abilities or background knowledge. You are the one wanting to do research, so think of something within your own ares of expertise. If you are a plumber then find a way to build cheaper drains ...
|
|
|
|
|
Yes, got one: Kolmogorov complexities.
Send me a private mail for more info
Rozis
|
|
|
|