|
I'd also add, that writing these things from scratch is challenging/rewarding/time consuming, but if you're doing it commercially, you'd almost certainly be better off using a known/supportable framework, like ACE, ICE or such to manage the low level stuff, while you concentrate on the higher level functions
'g'
|
|
|
|
|
Garth,
These last three posts you made are also helping to guide me in the right direction.
On the same note, concerning pre-made libraries, what are your thoughts on ASIO? This seems pretty close, but I haven't had a lot of time to fool with it lately. Have you had a chance to use it, and does that seem a suitable start for me?
Thanks again,
Michael
|
|
|
|
|
unfortunately I havnt had a chance to use it, although I am aware of its existence - needing boost, VC 7.1 or above is the kicker for me, we're still a MSVC6 shop
(Its likely I could get it to run on MSVC6, since the functionality from boost is contained headers, and if it doesnt use 'partial templates' it would depend on how much time I had) - this doesnt answer your question though ...
its got some good things going for it - been around a while, seems relatively stable, IPV6 support, the model seems relatively easy to understand - when it comes down to it, those are the tradeoffs I consider. Of course, we must each weigh up 'ease of use' according to our own background and knowledge, but there seems to be enough examples etc the only kicker which I havnt examined it for is how complex a server can one write with it - number of connection, event model etc - it seems suitable for 'small' client/servers though
|
|
|
|
|
|
Hello.
I'm trying to download a whole sequence od pictures, which are stored on this location:
http://resources.wizards.com/Magic/Cards/LRW/EN/
Now, this map is restricred, but if you enter a specific image url, like
http://resources.wizards.com/Magic/Cards/LRW/EN/Card143370.jpg
you'll be able to download the image!
Images are not named in order, from 000001 to 999999, but my guess is that this six digit number serves as a protection, from what I'm trying to do.
Anyways, I wanted to write a c++ program wich uses 'system()' function to pass a command to cmd, which than opens wget. I need to pass a parameter with that - a parameter that will be changed 999999 times and called 999999 times again and again. I tried to use this code, but wget just does not 'get it'
char temp[512];<br />
sprintf(temp, "wget %s ", parameter);<br />
system((char *)temp);
Now, output to cmd of this is
wget http://resources.wizards.com/Magic/Cards/LRW/EN/Card143370.jpg
and it magicaly runs wget! But...the parameter it gets, understands is (null) for some reason!
I've used all my knowledge, read alot of forum posts, references...no answers, tough I lerned alot
Thanks,
Gregor
|
|
|
|
|
Member 4287390 wrote: it magicaly runs wget! But...the parameter it gets, understands is (null) for some reason!
What do you mean by that? What is null?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Well, it runs it like this (copied literaly):
C:\Users\Gregor\Downloads>"MTG picture downloader"
Start
wget http://resources.wizards.com/Magic/Cards/LRW/EN/Card143370.jpg--00:27:41--
http://(null)/
=> `index.html.1'
Resolving (null)... failed: Unknown host.
End
C:\Users\Gregor\Downloads>
start and end are somthing I poped in the program, and I have no idea how null gets there...just a wild guess: wget's default, I'm going to chek wget manual now.
Update: null is not mentioned anywhere in wget manual! Is there any other way to call wget with parameters-.-?
modified on Saturday, February 9, 2008 6:37 PM
|
|
|
|
|
hmm I don't know anything about wget s I can only hopefully help
with the C(++) side of things...
What's the stuff tacked on to the end of the command line
("-00:27:41--...") ???
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Until you verify that both parameter and temp are correct, forget about calling system() .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
How to create controls at runtime in VC++?
Is there any good article for this?
Best Regards,
Suman
|
|
|
|
|
Search the class in MSDN and read Overview or Remarks sections. It describes how to create each control on the fly.
// "In the end it's a little boy expressing himself." Yanni
while (I_am_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hi Thanks for the help..
I got some idea here
Thanks & Regards,
Suman
|
|
|
|
|
What kind of controls? Windows controls?
Using MFC or straight Win32 APIs?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I want to create controls like button, list box, edit etc.. in runtime using MFC
Thanks & Regards,
Suman
|
|
|
|
|
Controls are windows, so they are created the same as any
other window, except they have predefined window classes.
In MFC, windows are created in two steps and destroyed in
two steps - one step for the C++ object (an object derived
from CWnd), and one step for the Windows object (the HWND).
CListBox m_MyListBox;
...
m_MyListBox.Create(WS_CHILD | WS_VISIBLE | LBS_STANDARD, CRect(10,10,100,40), this, ID_MYLISTBOXID);
My favorite reference for controls is the Control Library in MSDN[^]
The MFC docs have the MFC-specific info for the various control wrapper classes.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
For each control we have a class for it like CButton,CListBox,.. you can declare a variable of that class or derived your class of it and then make runtime control.
|
|
|
|
|
hello everyone,
i need to call my coding in C++ to mathlab..i have read some materials for it but i still couldnt get a clear view.really dont know how to start it..hope you all can guide me..thank you.
|
|
|
|
|
|
|
If I correctly understand. you would like to use your VC++ code from within Matlab. Right?
A solution is to turn your VC++ code into mex files. The benefit is that this will speed up the execution within matlab.
I know there is a tool called MexWizard. Have a look at www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=1368&objectType=file
Hope that answers to your question.
regards
|
|
|
|
|
i have three integer values as 11,23,56.. these are for hr,min and sec.
I want a corresponding CTime object. These is no any function like SetTime that corresponds to GetTime function.
Kindly help!
Priya Sundar
|
|
|
|
|
CTime class deals with the system time. So u can't use this class to set the system time.
|
|
|
|
|
sudhir.marni wrote: CTime class deals with the system time. So u can't use this class to set the system time.
That makes a whole lot of sense.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
CTime has a construcor that takes an hour, minute, and second value
(as well as year, month, and day, which you can use any valid values).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes Thankyou. It worked.
Priya Sundar
|
|
|
|