جواب بدین لطفا
Printable View
جواب بدین لطفا
سلام
من تا اینجا نوشتم ولی کامپایلر نمیشه و میگه مشکلش در قسمته fopen هستش ولی نمی دونم چه طور حلش کنم میشه راهنماییم کنین؟!
مرسی
کد:#include <iostream.h>
کد:#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <fstream.h>
int main()
{
fstream fp;
int ch[32][32];
fp=fopen("f:\tcc\test.bmp",ios::binary);
for( int i=0;i<=32;i++)
for( int j=0;j<=32;j++)
fp<<ch[i][j];
for( int k=0; k<=32;k++)
for (int l=0; l<=32; l++)
if ( ch[k][l]=1)
cout<<"1";
else cout<<"0";
getch();
return 0;
}
سلام
سعی کردم ایراد زدایی کنم.
ولی اصلا کد رو نخوندم ببینم چیکار می کنه؟! [ برای مشاهده لینک ، با نام کاربری خود وارد شوید یا ثبت نام کنید ]
کد:#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
#include <fstream.h>
int main()
{
fstream fp("f:\\tcc\\test.bmp", ios::binary);
int ch[32][32];
for ( int i = 0;i <= 32;i++)
for ( int j = 0;j <= 32;j++)
fp << ch[i][j];
for ( int k = 0; k <= 32;k++)
for (int l = 0; l <= 32; l++)
if ( ch[k][l] == 1)
cout << "1";
else
cout << "0";
getch();
return 0;
}