Well to begin with, it would depend on your OS/Compiler. But let's have a guess at the win32 API and go with...
int row, col, pos = 0; for ( row = 0 ; row < 250 ; row++ ) { for ( col = 0 ; col < 320 ; col++ ) { // do stuff with buff[pos], plot pixel...
Well assuming that int is 4 bytes, and each pixel takes 3 bytes, then the pixel data is all confused, and you have more work to extract the...
Sorry, I've still no idea what it is you've tried and how you could possibly be going wrong. Post some code.
size_t is the type which sizeof() returns, that's all. In simplistic terms it is not that much different from an int. Did you try to write the...
Unless you post an attempt, we can't begin to figure out exactly what you're looking at. To me it just seems a simple case of stepping through...
320 * 250 = 80,000 80,000 * 3 = 240,000 It's highly likely that you have 3 bytes per pixel, which typically means 1 byte Red, 1 byte Green and...
Refer to my other post for(i=1;i<=5;i++) { for(j=1;j<=i;j++) printf("%i",i); printf("\n"); } Becomes i=1; while ( i<=5 ) {...
So two for loops become two while loops - what's the problem?
for ( a ; b ; c ) d; Is approximately a; while ( b ) { d; c; }
http://www.go4expert.com/showthread.php?t=168 Sure we could help you, but all you've done so far is dump your assignment. Where is YOUR...
1. Post your code. 2. Don't forget the code tags, ie [code][/code] placed around your code. 3. 16! = 20922789888000. Depending on your data...
> int arr[col][row] = {(1,2,3),(4,5,6),(6,7,8)}; All those ( ) should be { } > void foo(int *a,int col , int row) Is it your intention to...
I recently posted how to allocate a 2D array here http://www.go4expert.com/showthread.php?t=7759
> even though new lang. were developed.? Carpenters don't agonise over why everyone still uses axes, following the invention of the chisel and...
Well if it's encrypted you have two choices - fgetc, to read the file one byte at a time - fread, to read a whole block of bytes at a time....
Encrypted by whom, using what algorithm and with what key? Good algorithms will destroy any sense of the idea of "lines" in the file and...
1. Use [code][/code] tags when posting code. 2. Why are you trying to read and write to the file at the same time?
How do you know how many lines/words there are in the file? > char todos_fich[i][2]; Aside from the fact that i is zero at this point, this...
Where is the 'while' which matches your 'do' ? Also, use [code][/code] tags when posting code.
Separate names with a comma.