|
I confirm, it is a good one
EDIT: it seems that the link is bad. I'll need to update my sig too.
modified on Thursday, December 06, 2007 2:06:53 PM
|
|
|
|
|
me too!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/codeProject$$>
|
|
|
|
|
the link seems to be fixed. and I have to admit that it is an article.
But someone seems to not think like me because Mr. Toxxt has been having a 1 for that 
|
|
|
|
|
Hello,
how to delete/remove some character from a string, without using CString::Remove('\n')?
I have to remove all "newlines" (crlf) from a file!
Thanks for help!
regards
termal
|
|
|
|
|
If the string for which you want to remove a character from is a CString object, why would you not want to use the Remove() method?
"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
|
|
|
|
|
You need to:
(1) read the file.
(2) change the read content, removing CR LF occurrences.
(3) write again the content to the file.
You can use a brute force approach, i.e. reading a char at time and discarding unwantend ones (maybe you need to lookahead 1 char) and then rewriting all remaining characters. On the other hand, you can speed up the whole operation using buffers.
Hope that helps.
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.
|
|
|
|
|
termal wrote: from a file!
So your requirement is to modify the existing file? Or create a new one? Or.....
Your efforts to use this site to receive help will be more successful if you supply complete, accurate and unambiguous requirements.
|
|
|
|
|
Hi,
I am using VS2005 Professional edition (procured by my company) on Windows XP Pro SP2 to develop a MFC application. Currently I am facing two problems and I am unable to determine the reason for the same. The application is packaged using Install shield which also include VC++2005 redistributable binaries and installs it on the target machine if these are not located. On my machine I have two versions of VC++ 2005 runtime binaries (one for VC++2005 and other for VC++2005 SP1). Now on to the problem description
1. When I execute release version of my application on my machine and perform Print operation via Print Preview dialog box, the application crash. The stack trace shows a crash in the MFC library mfc80u.dll (8.0.50727.762). However when I execute my application on a fresh machine and performs the same application it works fine. My query is why is the application using MFC libraries from VC++2005 SP1. I have not installed VC++2005 SP1 on my machine and not sure which application installed them. I tried copying MFC and C Runtime libraries from VC++ 2005 redistributables package along with the required manifest files to the application binary folder but still the application is using MFC libraries from SP1 and crashes at the same location. If I perform print operation directly using Print Menu item, the application works properly under all conditions. So I doubt if there is a bug in my application or is the application crashing due to the fact it is not complied with VC++ 2005 SP1 but trying to use MFC libraries from SP1. Though I doubt that it is most probably the formal case but I am not sure.
How do I ensure that I compile my application using the MFC and C runtime libraries from the original version and not from SP1? How do I uninstall VC++ 2005 SP1 MFC and C runtime libraries?
2. The same application also has mail sending capability which works fine on all versions of Windows except on Windows 2003 Server Enterprise edition with SP1. On Win2k3 Enterprise edition the application hangs when using mail functionality and I have to kill it using Task Manager. I doubt if it is something to do with WinSock libraries on Win2K3 but again I am not sure if it is due to a bug in my application.
Kindly provide me some pointers which can help me in resolving these issues.
Thanks and Regards.
|
|
|
|
|
I have been facing that problem too. You should use the VC_redist.exe Setup for the VS2005 SP1 runtime.
You find it on the MS-websites.
Greetings from Germany
|
|
|
|
|
Hi all,
I've just finished my c++ application on vc++ 2008 but I've found out that it needs the framework 3.5 to run.
Is there something to configure to make it independent from framework?
Thanks.
rotter
|
|
|
|
|
so you didn't code C++ but C++/CLI...
if you're using pure Win32 or pure MFC, you shouldn't have any dependency to the .NET Framework.
but if you mixed both... don't wonder
|
|
|
|
|
In the project settings should be an option to specify the framework version.
Greetings from Germany
|
|
|
|
|
Thank you for answering so fast!
But my project is pure prehistorical win32 api. It has no references to anything and I didn't find the framework version on the project settings either.
Maybe it's time to go back to good old vs2005
rotter
|
|
|
|
|
I have not used 2008. I have not read anything about it that would lead me to believe they dropped suppport for creating native C++ applications. It is far more likely that you just have not figured out how to do it.
|
|
|
|
|
Visual Studio 2008 needs the 3.5 framework to run. However, your (native) c++ applications compiled with VS 2008 don't need this framework.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Well, I finally solved it installing VS2005 , but I kept VS2008 too. If someone finds out the trick to make it work please write an article or something.
Cheers
rotter
|
|
|
|
|
While trying to build this project I get the following link error:-
<code>Error 26 error LNK2019: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(wchar_t *)" (?ConvertBSTRToString@_com_util@@YGPADPA_W@Z) referenced in function "public: virtual long __stdcall SmartGraph::SetLegendText(wchar_t *,long,long,long,long)" (?SetLegendText@SmartGraph@@UAGJPA_WJJJJ@Z) SmartGraph.obj</code>
It seems to be caused by the line:-
<code>m_strLegend = _com_util::ConvertBSTRToString(strText);</code>
I am using VS 2005, any suggestions please.
|
|
|
|
|
You need to add the library comsupp.lib (see [^]) to your project Linker command line options.
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.
|
|
|
|
|
Hope to learn and help others learn too.
|
|
|
|
|
Welcome. Having been here six months I can highly recommend it as a place to learn a lot and help other a bit as well.
By the way please post chatty messages in the Lounge to avoid being flamed and programming questions anywhere but the Lounge to avoid being thoroughly barbecued
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
welcome at the codeproject...
if you have any (specific) questions, don't hesitate.
|
|
|
|
|
Welcome to Codeproject and this forum for start do you have a question or problem on the vc++(your program)? 
|
|
|
|
|
Hi,
am sundar.I have one question in vc++.I have a problem when i accessing the https site through code.But its working in .net as well as in browser. How to access the https through vc++ code?
how to set the SSLClientCertificate Name in code?
SoapClient3.ConnectorProperty("SSLClientCertificat eName") =LOCAL_MACHINE\[store-name\]]cert-name ;
The http site is working when i access through the code?
Please give me the procedures to access the https site through vc++ code?
Anyhelp would be appreciated.
Regards,
R.Sundar
sundar
|
|
|
|
|
Hi
Please How I can delete element from the struct that contain arrays
This is My Code
<br />
struct Member<br />
{<br />
char name[50];<br />
char address[30];<br />
int number;<br />
};<br />
struct Member member[100];<br />
<br />
And i have this Function for delete elements But how i can complete it<br />
<br />
void delete_member ()<br />
{<br />
int search;<br />
<br />
cout <<"Enter Your Number of member:";<br />
cin >> search;<br />
<br />
for (int i=0;i<100;i++)<br />
{<br />
if (member[i].number == search)<br />
{<br />
<br />
<br />
}<br />
}<br />
<br />
-*-*-*-*-*-*-*-*-*
To Be Or Not To Be
(KARFER)
-*-*-*-*-*-*-*-*-*
|
|
|
|
|
You can't remove elements in such an array. And even worse, your array will be initialized with garbage structures (except if you provide a default constructor to your structure).
I suggest you take a look at a std::list, this will do what you are looking for (but you'll probably need some time to learn how to use it, look for some tutorials).
|
|
|
|