|
General Rule Applicable for any Programming language
*Read the Concept.
*Understand the Program logic.
*Practice
All the very best Pal
Thanks,
Rane
|
|
|
|
|
The first step is to read introductory books. You should probably learn C first because C is a subset of C++, so you'll already know the C part when you study C++.
The next step is to practice writing programs. Programming is like swimming in that you have to do it to learn it. You can't learn to swim just from reading about it.
Reading and understanding other peoples' code is also helpful.
Then more advanced books will help. I recommend Effective C++ by Scott Meyers. Design Patterns is a good book for learning how to effectively use the object-oriented features of C++.
|
|
|
|
|
Hi everybody,
I received a task that need to automatic download an internet page. I just have an URL and, from my software, whould like get it into a directory.
Someone can help me with this ?
Tanks for read my question
|
|
|
|
|
|
Can you use URLDownloadToFile() ?
"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
|
|
|
|
|
Hello All,
Good Evening,
I converted my project from ANSI to UNICODE project. In the Unicode project, the values changing in a text doesn't reflect by itself and the textbox needs UpdateWindow() to be called whenever there is a change in it. But this kind of behaviour doesn't happen with the ANSI project previously.
Can anyone advice on this ?
Many thanks in advance.
Bhanu
|
|
|
|
|
Could you give a bit more detail? I doubt there should be such a behaviour change in your program just because you went from ANSII to UNICODE. What did you change on your code? There are certain messages/notifications which have an ANSII and a UNICODE version (these are usually postfixed with an A or a W to indicate ANSII or unicode (WIDE) versions), could it be that somewhere you are listening for the ANSII version of a message which is not being sent anymore since you changed to UNICODE and now the WIDE version is sent? Show some code snipplet how you handled changes in one of your edit boxes which no longer functions.
> 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. <
|
|
|
|
|
Hi all,
I have a rich edit control in my application(VC6.0)which display some log messages.
How can I store the content of it to a text file.
Is there any direct method to do it?
Regards,
Sunil Kumar
|
|
|
|
|
If you are using MFC, call the StreamOut() method. Otherwise, send the control a WM_STREAMOUT message.
"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
|
|
|
|
|
unsigned int findPrimePalindromes(unsigned int array[],int start, int end)
I need to write a function base on that...
Can any one give me a kick start?
|
|
|
|
|
unsigned int findPrimePalindromes(unsigned int array[],int start, int end)
{
for (int loop=start; loop<=end; loop++)
{
if (ValueIsPrimePalindrome(array[loop]))
{
return (loop);
}
}
return (end+1);
}
The function "ValueIsPrimePalindrome" is left as an exercise for the reader...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Well you know: a prime number has only 1 and itself as divisors...Then you should check if it is palindrome (and that's really a simple task).
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]
|
|
|
|
|
|
I actually wrote the program, and it works for all value except after 10 million...
I need to keep the check time into half, so for the polindrome part, I only check half the strlen...
But it still would do much help....
I know whats prime polindrome!
|
|
|
|
|
ayeosq wrote: it works for all value except after 10 million...
Maybe you're running out of memory?
|
|
|
|
|
|
FILE* f = _wfopen(m_sFilespecW.c_str(),L"w");
size_t no = fwrite(tmp,sizeof(wchar_t),size,f);
fclose(f);
but it shows garbage.
when i change the code to:
FILE* f = _wfopen(m_sFilespecW.c_str(),L"w");
while(*tmp)
{
fputwc(*tmp,f);
tmp++;
}
fclose(f);
it saves the file but in ANSI format. it then fails to load in other function as that function only loads unicode files.
help me i want to save it in UNICODE.
|
|
|
|
|
What was wrong with the earlier reply?
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
See here and here.
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]
|
|
|
|
|
Also, he might want to see here[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I can get the device's status with c# every 15 milliseconds( more or less),but I want to get C++ code (not c++.net)which has realize SNMP++.
who can help me?Thank you!
|
|
|
|
|
There are several APIs available for SNMP on Windows.
WinSNMP Functions[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I am developing an application that has to act on external data that is both described and provided by the user, the client.
Currently I have created a wizard and the user can choose either to provide an SQL database (thus asking him for the DSN and the SQL query) or an XML file (thus asking him to for the appropriate xQuery query) or a CSV file (thus asking him for the file where it resides and the delimiting caracater).
Now, this may not be sufficient : I can imagine a plenty of complex scenario such the data cannot fall within those 3 types.
What I am tempted to do then is to make it possible for the application to call an external code provided by the user and which will be responsible for retrieving the data so that the application can deal with it.
My application is written in unmanaged C++, but the user may want to write that portion of code in JAVA, C# etc.
My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it.
(I am not even good at COM development)
So do you have suggestion, is there a sample application I can inspire from ?
Thank you in advance.
Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com
|
|
|
|
|
If the COM-based idea is possible, the question then how would I deploy the specs ?
Would it be in form of an IDL file ?
Is it then possible to take an IDL file and construct a COM project from it ?
Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com
|
|
|
|
|
Potato software wrote: My only idea, which is unfortunately still not clear (regarding implementation) is to write a sort of specification of a COM object : user must write his data-code following that spec. and my application should be able to load available COM objects that fall with particular class and allow the user to select his implementation. Then the application is capable of calling that COM object and retrieving data passed by it.
Well, the above idea is actually clear: Define one (or more) COM interface the user must implement (or expose COM interfaces from within your application).
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]
|
|
|
|