|
must be a new course starting somewhere - saw two like this last week
'g'
|
|
|
|
|
This isn't even subtle.
This signature was proudly tested on animals.
|
|
|
|
|
#include <iostream>
#include <string>
using namespace std;
int wmain(int , wchar_t* )
{
for ( ; ; )
{
cout << "Enter Title: ";
string s;
cin >> s;
cout << "Title: \"" << s << "\" is invalid." << endl << endl;
}
return 0;
}
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Amazing how a complex problem can be easily solved with such a few lines of code, isn't it?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
That's excellent. But you can add this to increase the performance :
for ( ; ; )
{
cout << "Enter Title: ";
string s;
cin >> s;
Sleep(5000);
cout << "Title: \"" << s << "\" is invalid." << endl << endl;
}
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
thk u joe
ur progrm is what i was looking for. it hlp me enter all the book titles. but my instructor gave me F in the homework. plz hlp, how fix it.
[edit] This was meant to be a joke, but on my original post, I forgot to use the proper icon [/edit]
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
modified on Sunday, March 29, 2009 7:04 PM
|
|
|
|
|
Professor to student: go here[^]
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
modified on Sunday, March 29, 2009 9:22 PM
|
|
|
|
|
Dear Joe,
I am ashamed and deeply embarrassed by my earlier post. It was meant to be sarcastic joke. But I forgot to mark it as joke
In fact if your read the content, it does not make sense. There is no way using your code as is to enter any book title, nor is it possible to exit the loop. I was amused by your code, and thought I throw a joke, but that went south.
Oh, well, better I modify the post before I throw other people off the cliff.
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Are you kidding? You made me laugh. (My reply may have fallen flat; it's what the professor should say to the student.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
modified on Sunday, March 29, 2009 9:21 PM
|
|
|
|
|
|
Hi all,
I have a report view type ListCtrl.here i m inserted number of items.
i m created a button remove to remove list items.
i m select multiple items from list than click on remove button.
than all selected ites are not delete.
i m using this::
for (int n=0;n < m_List.GetItemCount();n++)
{
if(m_List.GetItemState(n, LVIS_SELECTED) == LVIS_SELECTED)
{
m_List.DeleteItem(n);
}
}
please help me for this thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Of course: if you remove a specific item in your list, all items that follow will have another index (one lower). For instance if you remove the first item (index=0), then the index of the second item will change from 1 to 0 (because it become the first one).
You should reverse your loop: start from the end of the list to the begining.
|
|
|
|
|
But why all (not some) selected ites are not deleted?
|
|
|
|
|
Thanks its works.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
As another poster pointed out, when you delete an item it alters the indices of all the items that follow. For example, after item 0 is deleted what used to be item 1 is now item 0. Try modifying your code as follows:
for (int n=0;n < m_List.GetItemCount(); )
{
if(m_List.GetItemState(n, LVIS_SELECTED) == LVIS_SELECTED)
{
m_List.DeleteItem(n);
}
else
{
++n;
}
}
Even better, as the other poster indicated, go backwards and the problem goes away without the need for the above complications.
Steve
|
|
|
|
|
Hi,
im using Ccheckboxlist..and suppose im adding items to Ccheckboxlist as follows....
test
tester
testing
All
and later i want to change the position of "All" to first ie
All
test
tester
testing
Pls help me regarding the same....
|
|
|
|
|
I'd suggest you would delete item 3 from the list (the indices are zero-based) and insert a new item. Look at the DeleteString and InsertString methods.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
It's logically correct to do either of the 2 things.
Either make the list sorted.
Or add the items in the required order.
In this particular case, you should insert "All" at index 0.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi friends,
How can I use the MSChart Control in a MFC. I have problems with finding a way to put the data in the Chart control. I have stored my data both the data for the x axis and y axis in the access database. How to get the data from the database and then plot the graph in MS chart in MFC.
Quick reply is appreciated
Thanks a heap...
|
|
|
|
|
Hi friends,
How can I insert time information to the access database.I am working in MFC. Pl. help me how to insert time to access database.
Is there any format for insertion????
Quick reply is appreciated....
Thanks a heap...
|
|
|
|
|
How are you interfacing to the database? What's the data type of the relevant column in the database table?
Using (for example) OLE DB with an Access table containing a Date/Time typed field, you interface via a rowset that will have a member variable of type DATE, rather than a string.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
how to make the dialog transparent but the control is not transparent?
|
|
|
|
|
Could you explain a bit more what you mean?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Do none of the transparent[^] dialog[^] articles[^] on CodeProject help? Or couldn't you see them (they are transparent, after all).
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Use setlayeredwindow() api
|
|
|
|