j ai converti une appli de calul de crc32
de vc6++ vers vs2005
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 
ifstream file;
file.open(szFilename, ios::in | ios::nocreate | ios::binary, filebuf::sh_read);
 
		if(file.is_open())
		{
			char buffer[MAX_BUFFER_SIZE];
			int nLoop, nCount;
			nCount = file.read(buffer, sizeof(buffer)).gcount();
			while(nCount)
			{
				for(nLoop = 0; nLoop < nCount; nLoop++)
					CalcCrc32(buffer[nLoop], dwCrc32);
				nCount = file.read(buffer, sizeof(buffer)).gcount();
			}
 
			file.close();
		}
dans le
file.open(szFilename, ios::in | ios::nocreate | ios::binary, filebuf::sh_read);

il me dit
Erreur 1 error C2871: 'ios' : un espace de noms avec ce nom n'existe pas c:\\crc32\crc32static.cpp 7

au debut de fichier j ai mit

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
#include "stdafx.h"
#include "Crc32Static.h"
#include <fstream>
#include <iostream>
 
using namespace std;

aidez moi

merci