i not too long ago switched from vb to c++ and trust me the change can be quite anoying at times (however once u get used to it you will see how sloppy vb code can look in comparrison) ive coded your app for u from vb to c++ trying to use the same syntax 'vb style' coding and variable names, its quite straight (cant spell) foward:
Code:
#include "fstream.h"
#include "string.h"
#include "windows.h"
int OpenFile(char FileName[255]);
char filedat[255];
int main(int argc, char* argv[])
{
OpenFile("d:\\file.txt");
int a = strlen(filedat);
int i = 0;
while(i<=a)
{
filedat[i]=(char)(((int)filedat[i]) + 5);
++i;
}
MessageBox(NULL,filedat,"Outcome",0);
return 0;
}
int OpenFile(char FileName[255])
{
fstream File;
File.open(FileName,strlen(FileName),ios::in);
File.get(filedat,255,'\n');
File.close();
return 1;
}
hope it helps