|
humm, I dont think you will ever get the solution to this problem unless you try solving it.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
why don't u statr help me then? that will be nice what do u think?
|
|
|
|
|
Listen funny man you are taking the forum the wrong way.. PPl will not write the whole code for you. Thats ur job. If you get stuck implimenting a logic sowewhere down the line then some one may help you, its not garanteed that you will get help. But a question like this, there is little chance for you to get help, Instead ask your friend who has got the similar assignment and has done solving it.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
thanx for ur advice but u sound like death itself to mean wiht ur quote
|
|
|
|
|
antoinette33 wrote:
u sound like death itself
so smile.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
|
I am using strtol to catch bad entries:
looping on i
{
fgets(line, MAX_SIZE -1, fp);
pc = line;
for ( unsigned int j = 0; j < cols ; ++j, ++col)
{
num = strtol( pc, &pc, 10);
cout << i << " " << j << " " <<num<< " pc " << (*pc==' '?'.':*pc) << endl;
line comes from a file that looks like:
9 a5 3 9 1 3 9 5 5 7
10 9 4 6 10 10 8 5 1 7
10 12 1 3 10 10 10 11 12 3
/// an 'a' snuck in...strtol should arrest it, but it never does.
(however with a9 5 3 9 3 9 3 8 5 3, I see the letter 'a' in the cout.....)
Here is the output for the first case (when a doesnt show...)
0 0 9 pc .
0 1 0 pc .//pc should have been 'a', num is 0 is okay since it didnt get read
0 2 0 pc .//'num' should have been 5
0 3 0 pc .
0 4 0 pc .
0 5 0 pc .
0 6 0 pc .
0 7 0 pc .
0 8 0 pc .
0 9 0 pc .
Any ideas why strtol isnt performing as I understand it should?
thanks,
ns
|
|
|
|
|
nss wrote:
Any ideas why strtol isnt performing as I understand it should?
What are you expecting it to do? When calling strtol("9 a5 3 9 1 3 9 5 5 7", ...) , processing stops at the space following the first 9 because that is the first character that it did not recognize as part of the number. The same is true for calling strtol("a9 5 3 9 3 9 3 8 5 3", ...) , in that processing stops at the 'a' because that is the first character that it did not recognize as part of the number. Had you used base 16 instead, processing would have stopped at the space following 'a9' . Make sense?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
right, the first arrest is at ' ', but right afterit should choke on 'a' as well......
23 12 a4 56.....
It never prints out *pc = 'a'
|
|
|
|
|
I m stuck at complement of two sets in DeMorgan's law
any having solution plz contact me
thankx
|
|
|
|
|
Do you have some sample code that's troubling you?
http://lc.brooklyn.cuny.edu/LeftBarFiles/FromAboutLC/Core5Files/Logic/demorg.html
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I m stuck at complement of two sets in DeMorgan's law
any having solution plz contact me
thankx
|
|
|
|
|
i have a links for you cuz i have a discrete structure class go to www.whfreeman.com/gersting and the password is logic
|
|
|
|
|
I'm wanting to write a TCP/IP program that will spawn off client connections to a server applications. So far I have three sites that I want to connect to, and each site is listening for a connection.
So if I spawn these connections is it possible to be able to pass data to these spawned tasks? Can you setup a memory variable to pass data from the application that's spawning the tasks to the tasks themselves?
Does this sound like the best way to set this up.
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Hi, I don't understand COleVAriant type, can anone explin it to me, tanks?
For example, in this expression:
oSel = oRange.Move(vtI, vtII);
vtI must be an object of type Variant* Unit
vtII must be an object of type Variant* Count
I need this to do automation with MSWord (to select a range in a cell for example).
Thanks
|
|
|
|
|
I have a little problem in MFC...
a have a CString variable that has carriage return inside.
i want to extract that portion so i could replace it with a new part.
example:
CString cSample;
cSample = "This \n";
cSample+= " is \n";
cSample+= " my toy";
replace with
cSample = "This \n";
cSample+= " are \n";
cSample+= " my toy";
"is" was replaced by "are"... how can i do this in MFC?
|
|
|
|
|
Not sure I completely understand but you could do a...
cSample.Replace("\nis \n", "\nare \n");
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
I am utilizing the CMultiDocTemplate class to implement a form-based application in Visual C++. Within my InitInstance function, I do the following for each document template:
CMultiDocTemplate* pDocTemplateA = new CMultiDocTemplate(IDR_FORM1,
RUNTIME_CLASS(CDocA),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CViewA);
CMultiDocTemplate* pDocTemplateB = new CMultiDocTemplate(IDR_FORM1,
RUNTIME_CLASS(CDocB),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CViewB);
The problem is I have over 100 docucument templates, and it seems like I do not have enough memory resources to allow my application to run. For instance, when I have other applications running such as web browser or email, my VC++ program will not even execute. However, when I do close these other applications, my application will execute as normal, yet I am often limited to the number of forms that can be opened when selecting them from the menu. Is there a way to avoid allocating all my document templates upon initialization? Can I allocate memory to them only upon the command message OnDisplayDocX which occurs when I select them from the menu? Or is there a problem elsewhere?
|
|
|
|
|
The only issue I can see is that you could have problems with the menu/icon/accelerator loading, which is done in the LoadTemplate() virtual function. If you could get these resources to only load at such time an actual document of the given type is created it may solve/alleviate your problem. But MS may have killed that option for you as they stupidly call LoadTemplate in the CDocTemplate base class constructor. Its a virtual function so you cn override it (except if its called in the base class constructor).
Some investigation may give you a work around on the issue.
On a side note, why on earth do you have so many document templates? Now I have a project with 6 and thats pretty excesive. But 100? Are you covering every single document type in existance?
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Well, after declaring each pointer to a document template, I call the function AddDocTemplate(pDocX) and I believe this is where LoadTemplate() is being called. Perhaps I should change my design and utilize something else besides CMultiDoc? However, SDI would still give me the same problem right? Basically, my project has over 100 drawn forms and I access them from a menu. When a form is selected from the menu, it is opened in the window for viewing. Only one instance of each form can be viewed at one time, but more than one form can be viewed. I am still trying to find where LoadTemplate is being called. I am still at a loss as to how I can fix this. Any ideas?
|
|
|
|
|
why dont u create the forms dynamically?
have a generic form and populate it with controls etc as u need them no?
even consider using an html based solution?
"there is no spoon" biz stuff about me
|
|
|
|
|
OK - so how do I delete a member function (besides manually) in VC++.net.
Used to be you selected the function from the class in question and hit delete - all code would then be commented out. (How simple and elegent was that!) I can't seem to do that in VC7 and I can't find anything in any of the menus...Aghhh!
So far in converting my projects over from VC6 all I've found is some cool features, even less area for looking at code, slow compiles, slow environment, the elimination of some really useful features and a lot of frustration. What are they (Microsoft) trying to do to us?
Sorry for the rant...
John
|
|
|
|
|
ditto, so i came back to VS.06, i really dont need VS.NET as of now...
But any way to answer your question, i myself didn't find any option to delete a method and also didn't find any help form ppl in this forum or any where else.
"When death smiles at you, only thing you can do is smile back at it" - Russel Crowe (Gladiator)
|
|
|
|
|
This is poorly implemented and confusing, but you can delete some member funtions:
Open the .cpp file in question, click properties (you may have to click on the cpp file again to get the properties to recognize it.) You then select one of icons (events/messages/overrides) find the function click on it, then selecte <delete>... from the drop down.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thank you.
I actually got a response from someone at Microsoft asking about specific features I miss. This is my response:
Thank you for your reply.
1) Being able to delete member functions (user written or message handler) or member variables as in VC++6 (selected from the class view) would be nice.
2 Why was the tab order in the solution explorer changed from VC++6? Used to be Classes/Resource/Files now its Files/Classes/Resources I go back and forth from VC++6 to VC++7 and now it's a hassle to have to remember (or read) the tabs...
3) Why does the solution explorer switch to the right side when running debug - and why does the class view disappear - to me the class view is much more useful than the file view. And why does it switch sides? Why screw with my prefrences. I'm used to and like the explorer(s) on the left so that's where I put them...
4) What happend to the brouse mini bar that was in VC++6? I found that to be extremely useful when digging down through function calls
5) I'm sure there are other things that await my discovery. I've only been using .net for about 2 weeks...
You've added a lot of nice stuff for managing projects but it seems that your forgetting that the original intent is to write code...
There are a lot of thing I like too...<grin>...treating open files as property pages is very cool...
I'm suprised that I got that kind of response to my original question.
Regards,
John Horstkamp
|
|
|
|