thank you
Type: Posts; User: mad_muppet
thank you
I am trying to give an array some values and print them out ..
I initialise the elements to zero first .. after that I put values in .. then try print them out ..
the code compiles and runs .....
ah ok yes some of them are persistant .. 809 and 500 are the reference width and height for resizing the screen.
512 is the number of colors in the array made up of red green and blue which ,
50...
thanks for that .. so would this make sense for pxcolor?
struct pxcolor{
int r;
int g;
int b;
}arraycolor[512],*prgb;
I have just finished writing my new mandelbrot set program and it compiles and runs .. sometimes though it segment faults when I try and increase the iteration count maximum and the escape value. I...
I am trying to write a bitmap file taking BMP file format - Wikipedia, the free encyclopedia as my reference .. I am trying to write the 2x2 bitmap.
the code compiles and runs ok but when I try...
I am trying to write some code to draw the 2x2 bitmap on BMP file format - Wikipedia, the free encyclopedia.
I don't know how to fill in the array of colors .. so far as my thinking is going I...
this is some code I wrote .. I have a question about it because a while back someone on this forum mentioned that this is a form of daisy chaining functions and should be avoided.
for( y = 1;...
:p thanks for the heads up .. appreciate it .. could have spent a lot of time and effort only to be frustrated ..
thanks all for the help .. al.
ok I believe I am writing the file correctly ..
however after several hours searching I have yet to find a way to print my file out to console to check it is correct .. I cannot read it using an...
thanks for the replies .. I have a solution that appears to do what I want so far ..
#include<stdio.h>
//prototyping my structure added second variable and will need more later
struct foo{
...
what I have so far .. it will write out integers using the workaround p->array[c]+ 48 but Im pretty sure it will not work with floats I dunno how to do that .. I tried using fwrite but got a bunch...
I am trying to learn how to write from a pointer to a structure array to a file ..
this what I have so far.
this is a learning exercise for me later I want to write a structure holding different...
thanks for the help so far ..
I want to draw huge mandelbrot set pictures ..
currently I can draw pictures up too 12,000 x 8,000 pixels using sdl .. I want to increase that to at least 60,000...
hi guys .. I am a beginner programmer using c and Im looking for info on how to create a bitmap file .. draw to it .. close it ..and save it.
any help appreciated .. Im in an info gathering phase...
appreciate the advice .. already had a play with reducing screen size and number of iterations .. also changed to double .. its very fast now ..
I did fix the return types as well ..
I will...
I wrote a mandelbrot set progam in c a while back and posted it here at cprogramming .. one of the comments I got was there were too many global variables ..
having problems with a new install of...
thanks for the help .. very much appreciated ..
my daughter has used my c programming book as a coloring in book and my wife has disappered it while I was at work ..
if I try
#include <stdio.h>
void proof( struct foo *p){
printf("%i\n",p->a);
}
int main( int argc, char * argv[] ){
Im trying to learn how to access a structre through using a pointer passed from one function to another ..
#include <stdio.h>
void proof( struct foo bar *p){
printf("%i\n",p->a);
}
int...
thanks for the replies ..
I know I had it running correctly before on linux .. it does work ok on xp ..
the program is designed to work left high click to low right click .. not sure if thats...
I wrote a mandelbrot set program a while back and just lately I revisited it. it compiles fine on both windows xp and debian lenny and runs on both ..
however I only get color on xp .. black and...
thanks for that .. I think I understand where I went wrong ..
I learn something everyday ..:D
appreciate the help thanks ..
2 is more than half 3 ..
could be wrong ..
Im thinking the for loop performs the divison by 2 then tests for the exit condition .. otherwise it wouldnt work on either of 3 or 4 ..