|
DavidCrow wrote:
I'm curious just what type of point you are trying to make.
Well, I obviously appear to be in the wrong here, so, Im sorry, its late down here, and Im going to bed
|
|
|
|
|
While 'Anonymous' is technically correct, we do help people who show us some code they have attempted..
I'm providing a link to a site that has a fairly good intro to c++ - my suggestion is that you go there first, read the notes etc - you probably have some notes your teacher gave you - read those as well - dont be worried about it not sounding right the first time - take a break, read and re-read ...
http://cplus.about.com/library/blcplustut.htm[^]
Once you've done that, you should then break down your question into individual 'logical' operations - for example, you might start like this for Q1 :-
a) define the 'stop'/'certain' character
b) read a character from the keyboard
c) test if the character is the character defined at (a)
d) if (c) is false, store the character - you may need an array for this, then you/the program need to go back to (b)
e) if (c) is true, you may need to look (loop) through all the elements in the array, printing them out .. you may decide that at (d), you may also need to keep a count of the elements .. so modify step (a) to now read
(a) define the 'stop'/'certain' character, a counter to count how many characters are being entered (hint : int), and an array of characters (you may need to define a large array if you havnt thought of how man characters you want to store),
and modify step d) to include 'increment the counter'
you may decide that the easy way to do the test and 'loop' bit is to take a look at 'while loops'
once you have something that can save and print every character, then, make a copy of it for safe keeping, and alter it to handle the double space reduction issue .. again, write down what you need to achieve, break it into logical steps, then its easier to convert into code .. this goes for any language, wether thats c++, perl, whatever
many people will offer you solutions to the problem - there are a lot of ways to solve it .. but you are better off (as we say down here in Australia) 'having a go' and posting back here with something you've attempted.
think 'what can go wrong' - 'what have I assumed' - if you manage to declare a counter at 'a', is it fair to assume the the compiler set it to zero (I tell you its not, so, at (a), you might also want to add the step 'set the counter to zero')
do you see what Im doing - breaking down the problem, designing and then refining my design ...
I hope this has started you on the right foot - other people will probably shoot me for doing it this way ..
if all else fails, see your teacher/lecturer, even then, you shouldnt go to them with no ideas of your own
'G'
|
|
|
|
|
One of the best answers I've seen for a home work question!
INTP
|
|
|
|
|
Yeah well, sometimes people get lucky !!!
'G'
|
|
|
|
|
I've finally got boost::thread working in debug and release, but I think I'm doing something wrong.
Does anyone know how to armwrestle boostjam into building both the release and debug builds of boost::thread in the boostroot\boost_1_31_0\libs\thread\build\bin-stage directory? They seem to build into the temporary directories ok, but not all of them are moved.
Autolinking fails in the IDE unless I move some extra files into boostroot\boost_1_31_0\libs\thread\build\bin-stage (which has been added to the library include directories)
bjam command:
bjam "-sTOOLS=vc7"
I end up with:
boost_thread-vc7-mt-1_31.dll
boost_thread-vc7-mt-1_31.lib
boost_thread-vc7-mt-gd-1_31d.dll
boost_thread-vc7-mt-gd-1_31d.lib
but am missing:
boost_thread-vc7-mt-gd-1_31.dll
boost_thread-vc7-mt-gd-1_31.lib
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
sorry Andrew, the only thing I've built with boost was regex, and that was before the days of 'bjam' - it was a lengthy compile, but at least it worked ...
I couldnt even begin to guess where the problem is, maybe the targets arnt defined or something ..
I can tell you that the boost forums (from the boost homepage) are probably the better place to ask a boost specific question.
'G'
|
|
|
|
|
I guessed that would be the answer...
I had my fingers crossed that William Kempf (the author of boost::thread) may have answered directly, he occasionally answers questions on CodeProject
Thanks anyway,
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
When i call GetODBCFieldInfo i am getting:
fieldinfo.m_nSQLType = -9
which is not a valid type. The fieldname is a varchar value. Any idea why this might be happening??
|
|
|
|
|
Hi..
i am working on applicatipn that send data to aspx page via http protogol (POST)
i am using OpenURL to pass the values if the data had been accepted by the server it should return 0 or no from 1 to 10 for difrent types of errors..
somthing like that
pCFile=session.OpenURL("http://11.11.11.11/xx.aspx?var1=12525")
how can i read this returned value from CInternetSession varliable or pCFile and whitch fun to use
maybe some of u will find this is easy but it is very important to me so pleases i need the answere ASAP
SAM
|
|
|
|
|
Dear Friends,
I've developed a software in Visual C++. Actually it is a very simple application. With the help of this appliation, a user can make enteries in database, update/delete data from data base e.t.c. In database there are tables like, customers, suppliers, orders. So for each table i made dialog boxes. There are in all about 20 dialog boxes. (i hope you understand now that what kind of application it is and you must be thinking that it can be easily created in VB )
Now the problem is that i want to create main user interface and i dont have good ideas in my mind. Can you give me some idea or point me out some example application available here or somewhere else ???
Imtiaz
|
|
|
|
|
For general information on UI design take a look at the 'Joel on software' UI design textbook [^]
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
One idea might be to use a property sheet, with a tab for each table in the database. However, if this program is going to be used by anyone who does not understand databases/tables/etc, you might just want to present them with something a bit more generic. Perhaps a dialog with a few buttons on it (e.g., Add/Edit Customers, Add/Edit Suppliers, Add/Edit Orders).
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi, I put CFE_LINK style to my text in CRichEditCtrl , and it's blue and underline. I ve tried to repaint it but it is still blue and underline.
What should i do to have w CFE_LINK without blue and underline text?
[shame ;/, i really dont know how to change it]
Thanks You And Greetings
Michal
df
|
|
|
|
|
How can I accomplish the following???
1) Any new child window is opened maximized
2) Prevent any child window from being resized either min or max...
I have used this technique for preventing min/max buttons from appearing on the window title itself...
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
cs.style &= ~WS_MAXIMIZEBOX;
cs.style &= ~WS_MINIMIZEBOX;
return CMDIChildWnd::PreCreateWindow(cs);
}
How can I make sure the child window is always maximized???
Thanks
Cheers
How do I print my voice mail?
|
|
|
|
|
so when ur creating a child window do the following
CMDIChildWnd* child = MDIGetActive(&maximized);
if (child && (!maximized))
child->MDIMaximize(); // or MDIMaximize(child);
if u want to handle it in the childframe class itslef, then u've to override the OnSize(UINT nType, int cx, int cy) function of it. see MSDN for WM_SIZE for reference
hope this will help u
gudluck
Adi
|
|
|
|
|
|
Hi,
I have a MDI-Application. Now i want to use the Gray Background of the MainFrame as Startsite (i hope it's right in Enlisch). So, at first i have put a button in it: (In CMainFrame::OnCreate)
startButtonRechnungListe.Create("Liste gedruckter Rechnungen", WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON | BS_FLAT | BS_NOTIFY, CRect(10, 10, 20, 20), this, ID_RECHNUNGEN_LISTE);
this works fine, the Button is shown. But i isn't clickable.
so i put 'startButtonRechnungListe.BringWindowToTop();' after it and the button is clickable. but now the button is always over any document-window.
So, my Question is, before i go to put every document-window to top: is this the right way? Or is there a better way to customize the MainFrame Background.
Thanks in advance, and excuse for my bad english.
Christian
|
|
|
|
|
sybase 12.5
vc++
i want get the table name use SQLColAttribute();
but the result is NULL
exam:
....
(Select aa from bb)
rc = SQLPrepare(m_hStmt,(unsigned char *)szSQL,SQL_NTS)
SQLExecute(m_hStmt);
rc = SQLColAttribute(m_hStmt,i,SQL_DESC_BASE_TABLE_NAME ,szTable,128,&nTable,NULL);
....
i test at sql is successed ; but in sybase szTable is NULL,
why ??
thanks!!!
|
|
|
|
|
In my program i want to use DSP Group TrueSpeech(TM) for audio compression and Indeo video 5.10 Compression Filter for video.but How to get filter interfaces of them?
thx for any help
|
|
|
|
|
i followed all the instruction from DirectShow SDK document,but still can't find anything from GraphEdit's File|Connect to Remote Graph, Although the AddToRot function returned SUCCEED.
I'm using VC6.0, Win2k
thanks for any help
|
|
|
|
|
HI,
Can anybody send me the links of some simple tools that will determine the memory leaks in my VC++ code, I am using VC7 (.Net).
Thanks,
Prashant
|
|
|
|
|
Take a try for Rational Purify.
Jitendra
|
|
|
|
|
For free but tedious, check out MFC CMemoryState class.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
i read few topics about send email, some examples use ip address
my Q is: is an email address samilar to an ip address?
i.e. abc@yahoo.com is same as xxxx.xxxx.xxxx?
if yes, which part of an email address matches ip numbers?
thx
includeh10
|
|
|
|
|
a don't think you could encode email adress into IP address...
TOXCCT >>> GEII power
|
|
|
|
|