User Profile

Collapse

Profile Sidebar

Collapse
saptarshi
saptarshi
Last Activity: Jul 10 '07, 05:54 PM
Joined: Apr 26 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • saptarshi
    replied to Function Pointers in C not compiling with g++
    in C
    Hmm, i'm guessing that when the NULL_open is called, it is always called with an argument, though were it to be called with nothing it would crash.
    Anyways, assuming it is called with one argument, could you please show me how to recast the function to one that does not take any arguments? ? I ask because I'm learning C++ on this project itself.

    Thank you
    Saptarshi
    See more | Go to post

    Leave a comment:


  • saptarshi
    replied to Function Pointers in C not compiling with g++
    in C
    Thank you for the replies. I understand the predicament involved in expecting arguments but getting none (because of the declaration and definition contrasts)
    But then how does this compile and run in C?
    I can say this, because it is part of the R source code (The R Project - a statistical software - the code is in src/library/grDevices/src/devNull.c)
    and it works!

    I wanted to use QT, so i need to compile with...
    See more | Go to post

    Leave a comment:


  • saptarshi
    started a topic Function Pointers in C not compiling with g++
    in C

    Function Pointers in C not compiling with g++

    Hi
    I have header file in C (which cannot be changed).

    GraphicsDevice. h
    Code:
    ---some code---
    Rboolean (*open)();
    ---code continues
    Now another code(which also compiles in C) assigns to open like this
    dev->open = NULL_Open;

    where NULL_Open is defined as
    Code:
    static Rboolean NULL_Open(NewDevDesc *dev) {
        return TRUE;
    }
    I...
    See more | Go to post
No activity results to display
Show More
Working...