16,004,587 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Sergey Chepurin (Top 130 by date)
Sergey Chepurin
20-Nov-12 16:01pm
View
It does not work this way. I checked the solution and it works, then i told you how it can be done but you should code it yourself.
Sergey Chepurin
14-Nov-12 13:03pm
View
If you hardcode URL of your site (http://convert.wajihah.com/c.php?varname=artxt&text=يبتىلمينبىمنيبغعاanand123 ) in InternetConnect() ant InternetOpenUrl() in the given code insted of localhost, you will get the message "artxt=٣٢١dnanaﺎﻌﻐﺒﻴﻨﻣﻰﺒﻨﻴﻤﻟﻰﺘﺒﻳ&done=2" printed in Message Box. PHP code is nice (but not necessary) addition from Baracat.S. Create sample Windows 32 application in VC++2010 and add this code in proper place.
Sergey Chepurin
9-Nov-12 6:46am
View
venkat.yva: Sorry for the late answer, but it took me some time to understand what you really want. I just checked the code from Baracat.S and it works fine with your site. It prints proper text in Arabic. I guess, the answer given by Jochen Arndt is also coded correctly (simply didn't check it). I could add the C++11 almost universal solution, but don't see any need in that after solutions provided work fine.
Sergey Chepurin
9-Nov-12 6:46am
View
venkat.yva: Sorry for the late answer, but it took me some time to understand what you really want. I just checked the code from Baracat.S and it works fine with your site. It prints proper text in Arabic. I guess, the answer given by Jochen Arndt is also coded correctly (simply didn't check it). I could add the C++11 almost universal solution, but don't see any need in that after solutions provided work fine.
Sergey Chepurin
3-Nov-12 9:00am
View
Do you use VS2010 to compile?
Sergey Chepurin
21-Oct-12 4:00am
View
First line of the article says - "...`Clockwise/Spiral Rule'' which enables any C programmer to parse in their head any C declaration".
Sergey Chepurin
20-Oct-12 5:07am
View
As you asked "Game Timing and Multicore Processors" -http://msdn.microsoft.com/en-us/library/ee417693%28VS.85%29.aspx
Sergey Chepurin
19-Oct-12 12:24pm
View
My pleasure)
Sergey Chepurin
19-Oct-12 12:19pm
View
And why this question has been downvoted???
Sergey Chepurin
10-Oct-12 6:57am
View
Try option "Project from existing code..." See http://msdn.microsoft.com/en-us/library/b9cy3d6x(v=vs.80).aspx
Sergey Chepurin
25-Aug-12 11:04am
View
Do not guess about memory leaks, use professional tools like these (free) ones -Valgrind (*nix) or Visual leak detector (Windows).
Sergey Chepurin
5-Aug-12 9:17am
View
In ideal world, yes. But in reality not all recommended steps are present in program development. But the steps mentioned by Wes are simply "unavoidable". Examples - programs used inside the companies, some industrial and scientific software. Of course "from-the-shelf" software follows more strict procedure.
Sergey Chepurin
5-Aug-12 7:00am
View
Except for use cases, the steps listed by Wes are universal for every program worth to mention.
Sergey Chepurin
29-Jul-12 13:42pm
View
You can do everything on every platform in C/C++, but some things are much easier to implement using C# on Windows. C++ is a difficult language to learn and practice.
Sergey Chepurin
12-Jul-12 8:00am
View
From Wikipedia (
http://en.wikipedia.org/wiki/Ultimate%2B%2B
): "it doesn't use the Standard Template Library (STL)". May be you should reconsider your choice of GUI framework?
Or it will be not C++.
Sergey Chepurin
10-Jul-12 13:16pm
View
If it is a homework, just add corresponding tag. Anyway, try to get something useful from the sample code of S.Meyers (
http://www.artima.com/samples/cpp11NotesSample.pdf
List the 20 most common words in a set of text files). Though, you will have to adapt it for own needs because, i guess, your teacher would not believe you wrote it by yourself.
Sergey Chepurin
7-Jul-12 6:36am
View
In my opinion, "acceptable basic gui" you can create in Windows API + resource editor (this simple solution is actually quite often accepted in scientific or industry oriented not commercial applications). The problem is that for commercial "from-the-shelf" programs you have to propose something special or even fancy like mobile phone apps (at least that is what i see everyday). That is where some talent and design plus programming skills are required.
Sergey Chepurin
7-Jul-12 5:25am
View
I think this is a perfectly legitimate question for a beginner C++ programmer. This is kind of question you will not find an answer on Wikipedia or searching Internet. The number of people interested (>400 in a week) and the number of answers speak for itself.
Sergey Chepurin
7-Jul-12 4:33am
View
Very good answer but to the person already experienced in GUI programming. "Unfortunately,
C++ does not provide a standard GUI library the way it provides the standard stream I/O library, so we use one of the many available C++ GUI libraries." (B.Stroustrup, "Programming: Principles and Practice using C++"
Ch. 12
[
^
])
Thus, C/C++ projects usually apply "lesser of two evils" GUI solutions available, either OS oriented, or cross-platform, commercial or free framework. But never C/C++ native one which does not exist.
Sergey Chepurin
6-Jul-12 15:37pm
View
+5 for cross-platform solution, and this is a link to
Tinyxml
[
^
].
Sergey Chepurin
4-Jul-12 7:00am
View
Really good answer.
Sergey Chepurin
24-Jun-12 13:43pm
View
Chances are great this problem was already discussed somewhere. See
Obfuscating C/C++ Code[
^
]
Sergey Chepurin
26-May-12 5:43am
View
The OP's user name is "rasmiranjanbabu". But probably, he is known to somebody as "Sergey".
Sergey Chepurin
24-May-12 14:07pm
View
Thanks for a link. Surprisingly high quality article for a "strange" purpose - "Realtime Webcam Sudoku Solver"! Sounds like "puzzle to solve a puzzle" in C++ (which is a puzzle itself).
Sergey Chepurin
24-May-12 10:31am
View
Yes, and i think it is not possible with DCOM. But you could prove me wrong.
Sergey Chepurin
24-May-12 7:51am
View
I thought so, but was afraid to get you wrong. From my DCOM experience limited to above mentioned COM OPC client-server communication i understand that either you follow the procedure described and get objects connected, or you simply fail. There are strict security settings of DCOM that exist on purpose to make it impossible for anyone to use "no authorization" approach in not trusted environment.
Sergey Chepurin
24-May-12 4:31am
View
This is still a huge number of COM clients communicating with COM servers via DCOM in Windows.
Sergey Chepurin
21-May-12 10:52am
View
It could be UNICODE vs ANSI issue. Try to use TEXT macro -
Windows.h
...
LoadLibrary(TEXT("WinSCard.dll"));
Sergey Chepurin
6-May-12 9:22am
View
The correct answer - search Google/Bing. But this one is easy to find as example -
Multidimensional arrays[
^
]
Sergey Chepurin
6-May-12 8:47am
View
Seems that this is kind of "reserved" error code, the one with nowhere to find the meaning. Try to look in Application log of Event Viewer (that is what they often recommend in such cases).
Sergey Chepurin
6-May-12 2:14am
View
People, advice you to do right thing - to allocate large memory arrays dynamically, i.e. on the heap. But you can enlarge stack size if you want.
Sergey Chepurin
5-May-12 18:15pm
View
Use setrlimit() for RLIMIT_STACK resource. See
getrlimit, getrusage, setrlimit[
^
]
Sergey Chepurin
5-May-12 16:15pm
View
Pre-increment has a higher precedence level (3) over multiplication (5), thus, it is done first by compiler. See the
table of precedence levels and associativity rules[
^
]
Sergey Chepurin
5-May-12 11:15am
View
On VC++2010 -
Properties->Configuration properties->Linker->System->Stack reserve size
.
Sergey Chepurin
3-May-12 16:53pm
View
MSDN: "...tm_isdst is a required field. If not set, its value is undefined and the return value from
mktime
is unpredictable."
May be this sample can help:
// Example for CTime::CTime
time_t osBinaryTime; // C run-time time (defined in <time.h>)
time( &osBinaryTime ) ; // Get the current time from the
// operating system.
CTime time1; // Empty CTime. (0 is illegal time value.)
CTime time2 = time1; // Copy constructor.
CTime time3( osBinaryTime ); // CTime from C run-time time
CTime time4( 1999, 3, 19, 22, 15, 0 ); // 10:15PM March 19, 1999
From
CTime::CTime [
^
]
Sergey Chepurin
1-May-12 8:43am
View
>If the amount = 79.85, c5 will be finally equal to 0.
And what result do you expect? How is that related to floating point precision???
Sergey Chepurin
29-Apr-12 15:39pm
View
I strongly suggest you to search for sample code on Internet. This site is to help you to correct errors or to propose a better way to solve a problem. But not to solve it for you. This code you ask about is not new and not interesting for most of us to develop. But you, after finding a sample, can improve it if you want. Like this one: http://www.cplusplus.com/forum/general/27629/
Sergey Chepurin
24-Apr-12 11:33am
View
Thank you. But really, this is a surprisingly good C++ tutorial which is written by acting programmer during the period from 2007 to 2012 year. And as they say - "We are still adding content, so check back regularly!" The author combines both talents necessary for a good tutorial on programming language - tutor + programmer.
Sergey Chepurin
20-Apr-12 6:38am
View
If on Windows, then who handles images nowadays in plain C/C++? Ever heard of Direct2D - http://msdn.microsoft.com/en-us/library/ff934857.aspx?
Sergey Chepurin
15-Apr-12 4:43am
View
Sorry, if my reply may sound not very polite. Don't take me wrong, i use the word "guru" as a commonly accepted and understood name for a person with deep knowledge on the subject. You may agree or not. I take any language, including programming one, as a tool that can be used either to transfer ideas and knowledge (human language), or to make some useful programs for a living (or for a pleasure). But i am not interested in any theoretical applications or dark corners of the language to explore in spare time. And would never advice something like this to anyone. Best regards.
Sergey Chepurin
15-Apr-12 1:38am
View
There are many more interesting and useful things in the language you can learn, especially in c++11. But you two can still dig deep into something that even gurus cannot explain what.
Sergey Chepurin
14-Apr-12 13:10pm
View
Normally, in VC++ to connect to database you use ADO (ADO.NET for C++/CLI), OLE DB (mostly, with SQL Server and Access) or ODBC (to any database). Why are you interested in tool (sql++) that is not even mentioned in Wikipedia?
Sergey Chepurin
12-Apr-12 15:20pm
View
When you talk about time registration or time changing events there is no such thing as "speed issue", but rather precision. There is no time (or processor) consuming issue either, as he can use Sleep() for 1 second as a timer.
Sergey Chepurin
8-Apr-12 9:52am
View
You have to use InitCommonControlsEx() if you add common controls manually or want to add visual styles to your application. But if you add controls to Dialog Box via Resource editor (as, i guess, in this case because he addresses it by IDC_LIST2) it is already registered. And InitCommonControlsEx() has no effect.
Sergey Chepurin
6-Apr-12 6:43am
View
You are welcome. By the way, if you have to upgrade this "VC++ Example" from VC7 to VC++2010, use option "File->New->Project from existing code...". Add #pragma comment(lib, "Winmm.lib ") and it compiles.
Sergey Chepurin
6-Apr-12 6:40am
View
You are welcome.
Sergey Chepurin
5-Apr-12 10:47am
View
I think, he should go to the library to take a look at Knut's books. This is really academic level studying. And it is not clear what for to read these 3 volumes nowadays, if you going to program with STL classes. Not mentioning the price for used ones from 100 USD.
Sergey Chepurin
5-Apr-12 7:35am
View
There is a good surprise for you from Wikipedia that i just found "Book:Data structures": http://en.wikipedia.org/wiki/Book:Data_structures
Sergey Chepurin
2-Apr-12 8:32am
View
If you want to complete a single task without deep involvement, you can use CryptoAPI samples from Microsoft, for example:http://msdn.microsoft.com/en-us/library/aa382016(v=vs.85).aspx
But if you want to create something, read introductory materials available. For example, free chapters from "Handbook of Applied cryptography": http://msdn.microsoft.com/en-us/library/aa382016(v=vs.85).aspx
Sergey Chepurin
2-Apr-12 7:52am
View
If even a creator of encryption does not know how to decrypt it, leave it unbreakable for crackers to get defeated.
Sergey Chepurin
31-Mar-12 10:57am
View
http://courses.utas.edu.au/help/wvtwbind.htm
"What are bind variables?
You can add bind variables to a hand-coded SQL query when creating components such as charts, reports, calendars, frame drivers, and dynamic pages. Each bind variable corresponds to a column in the table or view on which the component is based and creates an entry field in the customization form for the component. Users can enter values in the entry fields to select the column data to display in the component.
Syntax -
A bind variable appears in a SQL query as an alphanumeric string preceded by a colon (:var1, :var2, :var3,&ldots;)."
Sergey Chepurin
31-Mar-12 3:09am
View
I understand. But, frankly, it even does not deserve a discussion. What is so special this console doing that you can not reproduce in GUI application? The construction you want to implement will have no chance to be called "a program". There will be no error/exception handling, when one part fails (say, console) the other (GUI part) will be still running thinking everything is okay. You cannot use this monster even for your personal needs because you can not be sure that both parts run without errors. Or you are going to implement some weird tracing mechanism? Once again, either create the GUI application including the console's functionality, or just use the console as it is for your needs.
The exception is when the purpose of console is to collect some data and to write it to some data store. Then, GUI application can be designed to get this data from data store, and handle it to present in the user selected form - table, chart, etc. Then the GUI application will be separate program communicating with database only.
Sergey Chepurin
30-Mar-12 3:54am
View
Making GUI for an application is a complex task by itself (and you tagged MFC, to make it good looking, i guess). Imagine that your big and good looking MFC GUI application would be calling relatively small console to do some dirty job. This looks weird, at very least.
So, writing the whole application with GUI would be a smart decision.
Sergey Chepurin
29-Mar-12 5:44am
View
Read this first - "Floating point numbers": http://www.learncpp.com/cpp-tutorial/25-floating-point-numbers/
It will take 20-30 minutes, but can save you hours.
Sergey Chepurin
27-Mar-12 14:13pm
View
The tutorial you mention is for MFC application, which you cannot build in VC++ 2005/2008/2010 Express (which, i almost sure, you use). But you can create Windows API (Win32) applications and then, to use this MSDN source as example "Using Timers":http://msdn.microsoft.com/en-us/library/windows/desktop/ms644901(v=vs.85).aspx#creating_timer
Sergey Chepurin
26-Mar-12 6:14am
View
From highly recommended tutorial -
"Virtual functions": http://www.learncpp.com/cpp-tutorial/122-virtual-functions/ and
"Virtual tables": http://www.learncpp.com/cpp-tutorial/125-the-virtual-table/
Sergey Chepurin
26-Mar-12 6:03am
View
Add MoveNext() as was proposed below.
These sources can help "HOWTO: Using the ADO OpenSchema Method from Visual C++": http://support.microsoft.com/kb/182831 and "OpenSchema function "http://www.codeproject.com/Articles/1075/A-set-of-ADO-classes-version-2-20#OpenSchema
Sergey Chepurin
22-Mar-12 6:48am
View
And i think, that first you should search Codeproject.com for related information. I am amazed myself what kind of useful information you can find on this site. See, for example, these two articles, first:
"Robotics/Embedded Systems"
http://www.codeproject.com/Articles/16165/Robotics-Embedded-Systems-Part-I
and "RC Car Control Programming"
http://www.codeproject.com/Articles/126859/RC-Car-Control-Programming
Sergey Chepurin
21-Mar-12 14:12pm
View
\r\n\r\n (not \r\n.\r\n) is used as a divider between header and the body. If there is no divider, then you can assume all the text is the header. By the way, the combination \r\n.\r\n looks strange at the very least.
Update:
But this combination is used - "a multi-line response is terminated with the five octets "CRLF.CRLF" (From "Post Office Protocol - Version 3")
And -
"Commands in the POP3 consist of a case-insensitive keyword, possibly
followed by one or more arguments. All commands are terminated by a CRLF pair.
...
Responses in the POP3 consist of a status indicator and a keyword
possibly followed by additional information. All responses are
terminated by a CRLF pair. Responses may be up to 512 characters
long, including the terminating CRLF."
Sergey Chepurin
14-Mar-12 11:32am
View
Here is the answer on similar question: http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/b7428d2c-ca91-496c-9e15-a1c57f29d5df
Sergey Chepurin
12-Mar-12 18:43pm
View
If you have no idea where to start from, search Internet for a Date class implementation (should help you to "validate the given date and display an appropriate message if it is not valid"). Julian date format can help you to calculate "how many days are left". But you should start with something by yourself.
Sergey Chepurin
5-Mar-12 14:40pm
View
You can try what it says to you: 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library. It is in Linker->Input->Ignore all default libraries. Or try to exclude only MSVCRTD.lib.
Sergey Chepurin
24-Feb-12 15:38pm
View
Read review for "Computational Geometry in C" by Joseph O'Rourke - http://www.amazon.com/Computational-Geometry-Cambridge-Theoretical-Computer/dp/0521649765/ref=sr_1_1?s=books&ie=UTF8&qid=1330115649&sr=1-1
Sergey Chepurin
26-Jan-12 6:11am
View
Everything concerning Web is faster to develop with .NET languages.
Sergey Chepurin
8-Jan-12 9:17am
View
I doubt very much that this code compiles. This is not described in the standard, and it generates an error when trying to recreate this code structure. Thanks for the link anyway, it is always interesting to see the internals of famous projects. By the way, i didn't see much of exception or error handling.
Sergey Chepurin
2-Dec-11 1:29am
View
Of course they can be modeled as objects and we know it. But what for in this task? I mean, that pure calculation task is hardly fit as OOP exercise. This is not a Mars rover mission.
Sergey Chepurin
1-Dec-11 16:27pm
View
And what OOP constructs you are going to implement here?
It is a pure calculation task.
Sergey Chepurin
29-Nov-11 15:29pm
View
You better write scripts, not programs.
Sergey Chepurin
25-Nov-11 7:16am
View
You know, probably you are right. I don't mind if you have such a strict view on this. Actually, i meant that he knows better than others what "abstraction" is in C++. And frankly, i don't know how anyone can disagree with that.
In the end, we are here not for the "points" to collect, but to share the knowledge.
Sergey Chepurin
1-Nov-11 16:12pm
View
Shouldn't you ask this question on OPC Foundation http://opcfoundation.org/forum/?
Sergey Chepurin
29-Oct-11 11:29am
View
Though not directly answering your question, this is a great collection of C++ books and free sources (including free university courses)- "The Definitive C++ Book Guide and List":http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list. Try to follow recommendations given there.
Sergey Chepurin
21-Oct-11 14:41pm
View
String comparison using raw pointers in pure C. Would be very inefficient way to reproduce in C#.
Sergey Chepurin
29-Sep-11 9:24am
View
I simply consider "merging the contents of sorted lists in sorted order" = sorting the output. No one-pass solution.
Sergey Chepurin
29-Sep-11 8:16am
View
To me, to output in some "sorted" order merged lists of sorted integers makes no sense. To sort these list makes much more sense producing the sorted output. But this has no "one-pass" solution for sure.
Sergey Chepurin
29-Sep-11 7:37am
View
You wrote: "Given n sorted lists of integers as file input"
To me this means that the inputs are sorted"
----------------------------------------------------
To me this produces an unsorted list of sorted lists of integers and you have to sort it somehow.
Sergey Chepurin
28-Sep-11 14:53pm
View
Problems solvable and not solvable by one-pass: http://en.wikipedia.org/wiki/One-pass_algorithm
Sergey Chepurin
23-Sep-11 5:41am
View
Just corrected the question to make it easier for the others to search for the answer on CPU time.
Sergey Chepurin
17-Sep-11 9:33am
View
Deleted
Static library (linked statically) has .lib extension. Dynamically linked library has .dll extension.
Sergey Chepurin
15-Sep-11 4:36am
View
lx, lX -A long unsigned hexadecimal integer in lowercase or uppercase.
Sergey Chepurin
14-Sep-11 9:48am
View
What is Windows version? Because Unicode has nothing to do with visuals.
Sergey Chepurin
9-Sep-11 10:09am
View
With PC-Lint the price is the problem (from 389 USD). You can check by yourself Wikipedia's list of tools for code analyzing http://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis.
Sergey Chepurin
7-Sep-11 15:52pm
View
There is not only information (very "informative"), but also complete code samples you are probably looking for.
Sergey Chepurin
26-Aug-11 7:21am
View
The worst thing for OP would be to trust everything said on Internet forums. The best for him would be do not become to much frustrated by cheating or stupid things said or seen on Internet forums. But the very best would be to do things by yourself (may be, with a little help of his friends).
Sergey Chepurin
25-Aug-11 4:02am
View
Pay attention that in this sample you have to use the correct version of regasm!
If the registaration fails, check the files on your computer for a version you need for the project.
Sergey Chepurin
23-Aug-11 8:57am
View
Using _bstr_t don't forget to add:
#include "comutil.h"
#pragma comment( lib, "comsuppwd.lib")
or compile with: /link comsuppw.lib
Sergey Chepurin
23-Aug-11 5:35am
View
ToolTips are not easy to implement in Win32, easier in MFC. I just proposed this solution, because nobody seemed to have one. I don't think you will find anything with such attitude, but good luck anyway.
Sergey Chepurin
22-Aug-11 5:58am
View
Are you aware of OPC Foundation Forum: http://opcfoundation.org/forum/ ?
Even though i wrote an OPC Client in C/C++ this particular implementation of Read/Write variable functions tells me nothing.
Sergey Chepurin
16-Aug-11 16:55pm
View
I agree with Chuck, try VC++ 2008. I know the are many issues with upgrading straight from VC++ 6.0 to VC++ 2010. But it went fine for me in VC++ 2008. You can do it for free in VC++ 2008 Express.
Sergey Chepurin
13-Aug-11 8:27am
View
Old programs from VC 6.0 (or later),in C/C++, MFC, can be upgraded to VC++ 2010 (if in Express edition then VC++ 6.0 first via VC++ 2005/2008). C and C++ are not .NET languages, thus there are no problems related to .NET classes for graphics.
Sergey Chepurin
9-Aug-11 9:49am
View
I know. And i'm really glad you provide one for the purpose.
Sergey Chepurin
9-Aug-11 8:48am
View
I gave 4 simply because it is not a universal solution. But i like it. And OP could use it.
Sergey Chepurin
9-Aug-11 3:37am
View
Agree with SAKryukov, leave registry to the system. Though, i used it to store encrypted product key (and can not blame if anyone also will do it). You can place encrypted file in special or hidden folder, folder with access restrictions, etc. I would encrypt only sensible user information if you are afraid of leaks. Every such operation takes human brain's and processor's resources, and you should be sure what you are doing.
Sergey Chepurin
8-Aug-11 11:46am
View
And now compare this with two pages of text with code in your original question. Now you can "break it down by delimiter"?
Sergey Chepurin
6-Aug-11 2:28am
View
May be he is talking about old Turbo C++ 4.5 which is not free. Though, it is no excuse. Strange wish to publish, anyway.
Sergey Chepurin
3-Aug-11 6:31am
View
1. Your code doesn't work for any character. Solution 2 works perfect to remove any character, including no-break space (0xA0).
2. To convert from C-string (char*) to basic_ctring (string) use: string basicstring(buff2);
(see http://msdn.microsoft.com/en-us/library/ms235631(v=vs.80).aspx)
Sergey Chepurin
2-Aug-11 8:22am
View
This is -2147312566 (80029C4A)- Error loading type library/DLL. There is nothing about "no sufficient rights". This error is caused by a damaged or an incorrect version of the .dll file. See for example:http://support.quickbooks.intuit.com/support/Articles/SLN41083
Sergey Chepurin
29-Jul-11 14:09pm
View
If you simply search for, say, "dummy head node in linked list", you will get a lot of good and reliable answers on this including pages from universities.
Sergey Chepurin
29-Jul-11 12:45pm
View
This is certainly the question for Dialogic forum: http://www.dialogic.com/den/forums/?tab=3.
Concerning includes you use it as required by the code. Get Dialogic SDK, study samples, read documentation describing Dialogic APIs.
Sergey Chepurin
29-Jul-11 11:20am
View
It is very unlikely that you will find someone with that mixture of skills applied to WinCE here. May be you should try MSDN Forum on Windows Embedded Compact: http://social.msdn.microsoft.com/Forums/en-US/category/windowsembeddedcompact
Sergey Chepurin
29-Jul-11 10:33am
View
1. Here should be i<9 (0<->8).
2. From the sample numbers provided and short description most of us assume that the requirements are: find the only two repeated numbers on neighboring positions out of one million random numbers from 1 to 9.
3. Sorting will not help in this case.
4. It is not obvious if sorting previous to search will gain the better results if two repeated numbers are on random positions.
Sergey Chepurin
24-Jul-11 15:57pm
View
He will thank you, i guess. By the way, this is not "philosophy", it simply answers the question correctly.
Sergey Chepurin
24-Jul-11 14:49pm
View
It is impossible to disagree with what you said. Except that it pictures a "perfect" programmer and team may hate him after all (there goes some smile).
Sergey Chepurin
24-Jul-11 10:07am
View
I agree, but this is not the optimization of existing code. You propose the new algorithm to be implemented and even want it to "represent data correctly".
Sergey Chepurin
23-Jul-11 15:29pm
View
You talk about licensing for paid versions of VS. I asked because the statement could be understood the way that you can not build apps in free versions of Visual Studio (because you did not
buy
the license) which is not true. As far as i know, you can build applications in any version of Visual Studio from Express (free) to Ultimate Edition (paid). And all these versions are licensed.
Sergey Chepurin
23-Jul-11 14:31pm
View
Could you, please, explain what kind of license we need to build apps in Visual Studio?
Sergey Chepurin
22-Jul-11 5:48am
View
From MSDN (http://msdn.microsoft.com/en-us/library/c8whxhf1.aspx:)"A class that contains at least one pure
virtual
function is considered an abstract class. Classes derived from the abstract class must implement the pure virtual function or they, too, are abstract classes".
Sergey Chepurin
15-Jul-11 5:06am
View
I hope you are kidding. Every technological process is periodical by definition (i.e. organized somehow). You need data not when it is changed but only when you can handle new portion of it, i.e. after predefined time period (and even if nothing changes).
Sergey Chepurin
13-Jul-11 1:43am
View
I don't agree with both of you. If you just say "do not do it" it will force the person to search for solution (probably in vain, may be wrong one) somewhere else. He has to know if it can be implemented or not (and why not). Of cause i do not mean any malicious code!
By the way, it takes just two clicks to find this code on Google/Bing/etc.
But here you can explain him why this is so bad to be implemented in any case.
Sergey Chepurin
13-Jul-11 1:24am
View
I always test the code proposed.
This is VB.NET variant and the window is "non-movable" (for whatever reason it is needed):
Protected Overrides Sub WndProc(ByRef m As Message)
Const WM_SYSCOMMAND As Integer = &H112
Const SC_MOVE As Integer = &Hf010
Select Case m.Msg
Case WM_SYSCOMMAND
Dim command As Integer = m.WParam.ToInt32() And &Hfff0
If command = SC_MOVE Then
Return
End If
Exit Select
End Select
MyBase.WndProc(m)
End Sub
Sergey Chepurin
9-Jul-11 14:12pm
View
It was open standard (i.e. free for everyone) a few years ago when OPC meant Ole for Process Control. Strangely now when it is about Open Productivity & Connectivity its standards are available only to Members who paid some fee.
Sergey Chepurin
1-Jul-11 4:57am
View
Thank you, but you don't look like in need of cpuid info.
Sergey Chepurin
30-Jun-11 15:24pm
View
There is absolutely no need for a second combo box. You select golf clubs from ComboBox, but output corresponding manufacturers in TextBox.
Sergey Chepurin
23-Jun-11 14:33pm
View
As no one in stackoverflow.com you did not comment on this: "An attempt to change a constant element MUST BE diagnosed by the compiler".
Update
- and here is the answer:http://www.glenmccl.com/ansi_014.htm
Sergey Chepurin
23-Jun-11 10:58am
View
I'am not a compiler expert, but it seems clear that at compile time str1 points to constant string (thus, can not be written->error) and str2 is just uninitialized array (can be written->fine). I mean, it is absolutely obvious in initial sample (without GetString), and from GetString() implementation seems clear at compile time that cin>> will try to overwrite the constant string str1 passed to it.
Update
:
I found the comment concerning this issue (http://stackoverflow.com/questions/5582552/i-cant-understand-why-segmentation-fault-error-occurred-in-c):
"...string literals are (regular) arrays of characters with the extra caveat of attempts to change the characters result in undefined behaviour. An attempt to change a constant element MUST BE diagnosed by the compiler. – pmg"
Sergey Chepurin
23-Jun-11 10:37am
View
I did not try to overwrite it. I just got wrong the line "you can not modify it". More interesting why compiler can not generate any error in this case.
Sergey Chepurin
23-Jun-11 9:57am
View
char * str1="hello world!";
cout<<endl<<str1;
str1 = "hello";
cout<<endl<<str1;
- str1 now is "Hello
Sergey Chepurin
22-Jun-11 9:31am
View
Correct, but what is the difference concerning libraries used in all VC++ 2010 versions (if it is not MFC/ATL)? Though this link ( http://social.msdn.microsoft.com/Forums/pl-PL/vcgeneral/thread/d40cda97-7e8b-464c-ab07-c5bb28b09b16) says that with SP1 everything will be okay. If nothing will help i think he should try VC++ 2008.
Sergey Chepurin
20-Jun-11 14:31pm
View
There are many Windows APIs for Diagnostics, Networking, Security, etc. As MSDN puts it (http://msdn.microsoft.com/en-us/library/Aa383723): " The Windows application programming interface (API) enables applications to exploit the power of Windows". I.e. Windows OS, not just "windows".
Sergey Chepurin
17-Jun-11 9:46am
View
There is already a good answer in Solution 2. Knowing Windows API will certainly make you a better programmer (as good knowledge of C/C++). Nowadays it not used for a team work (thus not adds pluses to your resume) but rather by individuals. It lacks advanced GUI and very time consuming to code. But it produces arguably the smallest and fastest Windows applications possible if (and when) speed and size matters.
Sergey Chepurin
16-Jun-11 9:27am
View
Correct the errors first. You can disable warnings for the time being by setting in "Properties"
Warning level->Off(/W0)
. You can remove warnings later improving the code.
Sergey Chepurin
15-Jun-11 5:55am
View
If a person asks such a question (and calling "tooltip" a "comment"), 99% he/she uses VC++ Express and there is no MFC libraries (solution 1) and no resource editor (solution 2).
Sergey Chepurin
11-Jun-11 7:30am
View
Very good solution indeed.
Sergey Chepurin
9-Jun-11 9:34am
View
The answer deserves 5 and thank you for the link to Redistributable package.
Sergey Chepurin
7-Jun-11 8:46am
View
Automated conversion is only possible (and has some sense) for .NET languages VB.NET<->C# as they share the same classes. You will have to manually convert C++ code to Java, but i think it would be easier to write Java program from the scratch.
Sergey Chepurin
5-Jun-11 15:58pm
View
You may also ask this question on some of Visual Studio or C++
MSDN forums
.
Sergey Chepurin
1-Jun-11 3:05am
View
It can be but I am not sure. See, if i open "Open file" dialog window (which has nothing to do with List View on main window) and then press "Cancel" everything goes fine (WM_NOTIFY received). But if i select some file and press "Open" - the input from List View (WM_NOTIFY) is lost. There are other controls that are not affected, just List View notifications.
Sergey Chepurin
4-May-11 17:42pm
View
I double-checked it and the correct syntax is:
WHERE Month(Sample_Date) = 4 And Sample_Date > #04/21/2011#
- outputs dates only in April after 21-th.
The previous example will output data after certain date in every month.
Sergey Chepurin.
Sergey Chepurin
2-May-11 6:03am
View
Is this really VB.NET category related?
Sergey Chepurin.
Sergey Chepurin
2-May-11 2:04am
View
Then, if you manage to find config (option) file such as my.cnf or mysql.server file you can try to parse it looking for
pid_file
lines. At least that is what other people do sometimes. Take a look on that
code
and corresponding files.
Sergey Chepurin.
Sergey Chepurin
30-Apr-11 15:40pm
View
So i am right? But this is a question for hacking related forums. I am interested in this problem simply because it can be helpful in understanding of networking issues (
hardcore networking
). There are many things that were discovered and developed by hackers and later used in general programming. As usual in such cases, i can only advice to start from Wikipedia.
Sergey Chepurin.
Show More