|
Didn't this come out of Deitel's "C++: How to Program" book? Is this your assignment?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
yes but it is from exercise.Can you tell me where solutions are available.it would help me a lot
|
|
|
|
|
tksrules wrote: Can you tell me where solutions are available.
In the classroom/lab. Does the instructor offer a Q&A session either at the start or near the end of class?
tksrules wrote: it would help me a lot
Quite the opposite, actually. You can't post a big wad of code on some Internet forum and ask someone to help you figure it out. I guess you can, but then you haven't been helped. At a minimum, you need to isolate the problem down to a small handful of statements (the actual number varies, but if it's more than a dozen, that's likely too many). Everything else is irrelevant and only acts as a hinderance.
Instead of trying to work through 200 lines of code, why not start with a smaller project, get it working, and then add to it until the problem shows itself?
This forum is frequented by a lot of sharp people that will gladly help you, but they aren't going to do it for you. You might look real closely at Package::setWt() and Package::setShip() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
i am solving assignment myself...i will take ur advice.
|
|
|
|
|
We (Italians) say 'tana!' in such circumstances...
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]
|
|
|
|
|
Which translates to what in English?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"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
|
|
|
|
|
Well, I'll try...
When playing hide-and-seek, if you eventually discover your opponent hiding place then say 'tana!' and win the game.
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]
|
|
|
|
|
So, that translates to "gotcha" in English. Hand in the cookie jar?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Yes, 'hand in the cookie jar' looks appropriate.
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]
|
|
|
|
|
hi all,
if any body having the code regading encryption and decryption functions that will work in the sunOS please send it to me.
regatrds
suresh
modified on Monday, February 16, 2009 7:59 AM
|
|
|
|
|
Do you know about Google [^]?
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]
|
|
|
|
|
|
Stuart Dootson wrote: SunOS was obsoleted many, many, MANY years ago[^]...
He could be right as well. We still write code for SunOS (Indian Railways use it).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I thought the company I work for had out of date IT - we still use Windows 2000 and Office 2000
But still using SunOS? Last time I saw that was around 2000 - our team had a SunOS box with Oracle as our development DB server.
But the first time I saw SunOS was in the late 80s at university, when we had one of these[^] shared between around 100 students. Now, that was slow - even though we were all using VT100 terminals...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Stuart Dootson wrote: I thought the company I work for had out of date IT - we still use Windows 2000 and Office 2000 Dead
I'm fortunate on that. At work place, we have pretty good configuration: NVidia Quadro, Intel Xeon (2 processors, 2cores per procesor) clocking at 3+ GHz, 4 Gigs of RAM and Windows XP some running 32 bit, some running 64 bit, etc.,
One of our earlier projects were for Indian railways and they are *still* running SunOS. Not long ago do I remember debugging on their premises, on an AIX machine with VI editor (not a dumb terminal, semi-intelligent, has a 200 MB hard disk drive) and the code runs on a SunOS server machine. Not the happiest thing to do if you ask me. We still receive support requests that sometimes involve writing code for SunOS, which fortunately some of my juniors take care of.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Windows 2000 is OK to program for - the main issue is that most modern development tools tend to have XP as a minimum.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello All,
Iam using CTreeCtrl method to add items in a tree.Actually i create two root nodes using GetRootNode()method.I add both root nodes properly in the tree,But what's my problem is i need to add child nodes in appropriate parent(root)nodes at runtime.But,all the child nodes adding in the first parent(root)node only.once i use deleteallitems()method and redraw the tree only child nodes are added in appropriate parent(root)nodes.Without using DeleteAllItems() i need to add the child nodes in a appropriate parent(root)node.
please anybody help me.
Thanks in advance,
Regards,
bhanu.
|
|
|
|
|
I'm not really sure what your problem is...
Try this:
CTreeCtrl *pTree = (CTreeCtrl *)GetDlgItem (IDC_MYTREE);
HTREEITEM hRootOne = pTree->InsertItem ("Root One", TVI_ROOT);
HTREEITEM hRootTwo = pTree->InsertItem ("Root Two", TVI_ROOT);
pTree->InsertItem ("Child One", hRootOne);
pTree->InsertItem ("Child Alpha", hRootTwo);
pTree->InsertItem ("Child Beta", hRootTwo);
Note the use of TVI_ROOT for the root items, and that I keep track of the return values to use later.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi,
I am using a MULTILINE Edit Class with Rich Edit
It Seems like EM_SETCHARFORMAT doesn't have enough flexibility
in setting the Font
Get use the Device Contexts API's to Set the Font
hfont = CreateFontIndrect(&logfont);
... SelectObject(hdc,hfont);
|
|
|
|
|
You don't set a font of a control by getting a temporary HDC and setting the font of that. At best you're wasting your time - at worst your corrupting the DC pool.
Have a look at http://www.codeproject.com/KB/edit/rulerricheditctrl.aspx[^]. Good article on rich edit stuff, with formatting buttons, etc.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hi,
The Main Focus of the this article is the CFontDialog CLass
Which seems like interface for Rich Edit Which uses The Charformat
sturcture Using some of the info from the LogFont structure
My real need was to able to put a certin amount of caracters on a line
of a Multiedit Dialog Box
The Logfont Structure Contains lfHeight and lfWidth data memebers
to do this (size the charcters ) while the Charformat only Contains a
yHeight member I wonder if yOffset data member in CharForamt is the
same as the lfWidth member in the LOGFONT data structure
thankx again
|
|
|
|
|
You have to be careful - that lfWidth for example, is only for an average character. A line of iiiii's will be shorter than the same amount of wwwww's.
Have a look at GetTextExtent, as that will tell you exactly how manu pixels you need for a given font / string.
Also, the PathCompactPath function may help you if the text you're trying to fit in one line is a file path (or can be treated similarly)
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hello All,
Iam using CTreeCtrl method to add items in a tree.Actually i create two root nodes using GetRootNode()method.I add both root nodes properly in the tree,But what's my problem is i need to add child nodes in appropriate parent(root)nodes at runtime.But,all the child nodes adding in the first parent(root)node only.once i use deleteallitems() and redraw the tree only child nodes are added in appropriate parent(root)nodes.Without using DeleteAllItems() i need to add the child nodes in a appropriate parent(root)node.
please anybody help me.
Thanks in advance,
Regards,
bhanu.
|
|
|
|
|
|
Iain Clarke wrote: I apologise...
You don't need to [^]
Regards,
Sandip.
|
|
|
|