|
That happens because '\n' is actually written as '\r\n' to the file system. I believe there is a flag you can set in the istream class that will disable that when reading. Check MSDN for more details.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
What Zak said
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
69 Bay wrote: I am currently using the C FILE, fgets, fgetc, etc, but should update to a more up to date technique.
If what you have works, why update code just for the sake of updating it? Sure, C++ streams exist, but are they advantageous for you and your situation?
69 Bay wrote:
This works, but is there a much less labourious way to do this sort of thing?
This is how I always do it.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi - thanks for looking
I am working on a new app - rather than porting the old code across (and not learning anything new) I wanted to try and do it using C++
|
|
|
|
|
Hi ,
I have tried a sample app using interface IActiveDesktop( COM ). But its not compiling. I have added the header file "shlobj.h" were IActiveDesktop is declared but its always showing undeclared identifier. Do we have to use any other file to use the same
thnx
RinuRaj
|
|
|
|
|
Sry...I have cleared rhe problem by including the header file
wininet.h in the stdafx.h before including the file afxdisp.h
thnx
RinuRaj
-- modified at 5:16 Tuesday 15th August, 2006
|
|
|
|
|
|
Hello everyone,
Are there any native security library for Windows Mobile 2003 provided by Microsoft, providing DES, AES and SSL?
thanks in advance,
George
|
|
|
|
|
CryptoAPI is the interface to system cryptography facilities. Windows Mobile 2003 comes with the Microsoft Enhanced Cryptographic Provider, which supplies the DES, AES and SSL algorithms. See CryptAcquireContext .
The simplest way to use SSL, from the client side, is to turn it on at the sockets layer: see Implementing a Secure Socket[^] for how to do this.
|
|
|
|
|
Thank you very much Mike,
I have read MSDN according to your recommendations. I think CryptAcquireContext is just an interface and Microsoft Enhanced Cryptographic Provider is the implementation of CryptAcquireContext interface, right?
regards,
George
|
|
|
|
|
Hi All,
I am mounting an SMB share as a windows network drive and its working fine. Now I would like to customize the authentication dialog that pops up when selecting the drive with my icons. Is there a way to do it ? Can I use shell extensions for that ?
Any help or pointers would be greatly appreciated.
Thanks
Jugs
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
XMinds
|
|
|
|
|
It's the serie A that a(4x4x4). I need a code for this serie. and at least how many elements does this serie a have? Pls help me in 10 minutes?
Isa BOZTEMIR
YILDIZ TECHNICAL UNIVERSITY
STATISTICS DEPARTMENT
|
|
|
|
|
greatisa wrote: It's the serie A that a(4x4x4).
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
I would like to convert the following code to return the values of m_data as a return value of Display, instead of using 'cout'. Can I for example, return a list of strings, by inheriting from CGenericList itself? Any ideas?
GenericList.h
--------------------
template<class T>
class CGenericList
#pragma once
#include ".\GenericNode.h"
#include <iostream>
using namespace std;
...
T Display()
{
CGenericNode<T> *pTemp = m_pFirst;
while(pTemp != NULL)
{
cout << pTemp->m_data << _T(" ");
pTemp = pTemp->m_pNextNode;
}
cout << endl;
}
GenericNode.h
-----------------------------
#pragma once
#include <stdlib.h>
Also, these errors were not showing up before I inherited CGenericList, what is the problem here?
GenericList.h(99): error C3861: '_T': identifier not found, even with argument-dependent lookup.
GenericList.h(99): error C2593: 'operator <<' is ambiguous... I haven't overloaded '<<'.
Jon
|
|
|
|
|
I have no problem getting at controls in a window using the handle, but does anyone know how I may get at the labels or memory that might contain them?
|
|
|
|
|
Billydo wrote: get at the labels or memory that might contain them?
what do u mean?
If u want to get the text in that control, u can use GetWindowText().
nave
|
|
|
|
|
|
Can anybody help me with this error?
During debug mode I have receive this error message:
MSVCRT.DLL: Access Violation.
But if i Run my application on Release Mode. No error occured.
Your help is appreciated.
|
|
|
|
|
|
The best approach is always to use the debugger. Run your program under the debugger (Build, Start Debug, Go). Do whatever you did to make the error occur. You'll get a dialog box reporting a 'First chance exception in MSVCRT.DLL (code 0xc0000005)'. Note the position of the instruction pointer. Look at the call stack window to see which part of your program called into the C runtime.
You probably passed a NULL or invalid pointer into the C runtime somewhere. Most commonly this is due to an uninitialised variable: the debug version of the C runtime will initialise the stack to 0xCCCCCCCC, while the release version does not do this. The reason for doing this in debug mode is specifically to catch uses of bad pointers.
|
|
|
|
|
how to set a dialog to be modal dialog??? i want to set a pop up dialog to be modal dialog, can i set it by code?
|
|
|
|
|
just create and object of that dialog and call DoModal function.
eg:
CMydialog MyDlg;
MyDlg.DoModal();
nave
|
|
|
|
|
But i can't.
because i create the dialog by pointer
CMydialog* MyDlg;
And i use
this->MyDlg->ShowWindow(SW_SHOW);
to show the window...
But it is not modal window...
I want to set it to be model window...
how can i do it?
Thx
|
|
|
|
|
CMydialog* MyDlg = new CMydialog();
MyDlg->DoModal();
What prevent u from calling like this...?
nave
|
|
|
|