Thread: difficulty with pgband syntax

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    2

    Smile difficulty with pgband syntax

    Hallo!

    I've been mashing my head against the wall for a couple of hours trying to get pgband to pass me a user-defined axis coordinate. I've constructed an image (a random magnification pattern) that i want to horizontally sample a few times. I want a human being (me) to review the pattern, then use cpgband to graphically select a y-coordinate (all that is really required is this one value) where interesting features (light ray caustics... tres cool) crop up.


    The following code throws an error:


    char ch[1];

    float slice_x,slice_y;

    slice_x = 1.;

    slice_y = 1.;

    cpgband(5,0,0,0,slice_x, slice_y, ch);


    The error is:
    GML_eleven.c:620: error: incompatible type for argument 5 of 'cpgband'
    GML_eleven.c:620: error: incompatible type for argument 6 of 'cpgband'


    I cannot see why this is the case... I though cpgband wanted floats at argument 5 and 6?

    Does anyone have any pointers on the correct implementation of cpgband? Tad lost here.

    Thanks!

  2. #2
    Registered User
    Join Date
    Nov 2008
    Posts
    2
    Aha!! pass cpgband one dimensional float arrays at argument 5 and 6 and it behaves itself very nicely. Just in case anyone was wondering.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. have some difficulty compiling a project
    By Masterx in forum C++ Programming
    Replies: 1
    Last Post: 04-04-2009, 07:49 AM
  2. got difficulty on this
    By gtr_s15 in forum C++ Programming
    Replies: 4
    Last Post: 02-01-2006, 09:37 AM
  3. homework giving difficulty
    By jjj in forum C Programming
    Replies: 5
    Last Post: 09-13-2002, 06:35 PM
  4. Game difficulty
    By pdstatha in forum C++ Programming
    Replies: 5
    Last Post: 06-30-2002, 04:12 PM
  5. Difficulty superclassing EDIT window class
    By cDir in forum Windows Programming
    Replies: 7
    Last Post: 02-21-2002, 05:06 PM