User Profile

Collapse

Profile Sidebar

Collapse
rolan
rolan
Last Activity: Apr 18 '09, 08:19 PM
Joined: Jan 25 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • rolan
    started a topic OSP (Operating Systems Programming)
    in C

    OSP (Operating Systems Programming)

    Does anyone have experience with OSP in c? I've been searching for examples of c code, so that I can understand how this module works.

    I've been reading through the documentation, but I'm having trouble figuring out how to gain a handle on processes given by SIMCORE.

    If someone has an example of code which would illustrate how to gain a handle on newly created processes, or just a working code sample, it would be...
    See more | Go to post

  • rolan
    replied to return array mismatch
    in C
    In reality that is actually what I did. I made the axis variable the third parameter of the function.
    Thanks for that info about axis pointing to axis[0] that helps quite a bit in understanding where I went wrong. :>

    As for what I'm doing, these vectors are being used for a trackball, and part of this requires me to project 2D coordinates into 3D coordinates. Thus there are both points and vectors involved in my calculations....
    See more | Go to post

    Leave a comment:


  • rolan
    replied to return array mismatch
    in C
    I guess one solution is to just pass the public 'axis' variable into the function and change the function to void. Then the values in 'axis' will be directly changed.
    See more | Go to post

    Leave a comment:


  • rolan
    replied to return array mismatch
    in C
    the error message is:
    error: incompatible types in assignment of `float*' to `float[4]


    basically, I thought that the variable axis was a pointer to an array, and since v3 is also a pointer to an array of the same size I thought they would be interchangeable . But apparently not.
    I'm not quite sure how to fix this.
    See more | Go to post

    Leave a comment:


  • rolan
    started a topic return array mismatch
    in C

    return array mismatch

    Hi, I'm having troubles with a returned float array which seems to think it's a single float. Axis is defined as a float[4] on a public scope.
    Code:
    void axisRotation(float v1[], float v2[]){
    			float *v3, v4[4];
    			v3=(float*)malloc(sizeof v4);
    			axis= crossProduct3D(v1, v2, v3); //error occurs on this line
    			free(v3);
    		}
    Code:
    	float* crossProduct3D(float v1[], float v2[], float v3[]){
    ...
    See more | Go to post

  • rolan
    started a topic casting const char* to char*
    in C

    casting const char* to char*

    I am writing a program in c++ using fluid with the FLTK libraries. I have a text_input widget in my main window, and when I try to access the value in the widget it returns a const char*.

    I need to use this const char* as part of a filename and so I need to convert it to a char* (or some other usable form).

    One guy said this is not possible in c++, but I'm assuming there must be some way to use this or else fluid would...
    See more | Go to post

  • rolan
    replied to creating an array in a function
    in C
    Thanks so much, using the new operator worked wonderfully.
    See more | Go to post

    Leave a comment:


  • rolan
    started a topic creating an array in a function
    in C

    creating an array in a function

    I'm trying to create a function which will return a pointer to an array, however this causes a massive number of errors, so I'm wondering if it is possible to do this in c++. This is the code I'm trying to use:

    [PHP]int *getMatrix(int column, int row){
    int sparseMatrix[column][row];
    ...
    return &sparseMatri x[0];
    }[/PHP]


    I want to be able to use this function to...
    See more | Go to post

  • rolan
    replied to Creating a symbol table in c++
    in C
    Thanks for your guidance. Just one question, which may be laziness speaking, is there somewhere I could find a list of the commonly used keywords for c++? (or at least the standard keywords) Or will I just have to tailor the list of keywords to the program I try to parse?
    See more | Go to post

    Leave a comment:


  • rolan
    started a topic Creating a symbol table in c++
    in C

    Creating a symbol table in c++

    This is for a class assignment, and I need some help getting my head wrapped around the problem.

    The problem is to create a symbol table for a c++ program. I know what a symbol table is, but figuring out how to create one is my difficulty.

    The only way I can think to create a symbol table is to have a list of valid keywords which I then use to search through the source code. This would enable me to find the declarations...
    See more | Go to post

  • rolan
    started a topic user-defined class and a dynamically sized array
    in C

    user-defined class and a dynamically sized array

    I am trying to figure out how to store and access an array, which is created inside a function, and needs to be accessed outside the function.

    My user defined class has set and get functions for 2 values, "value" and "pseudoAddress" .

    "matrix" is of the user-defined class,
    "*address" is a pointer to the user-defined class

    I want *address to store the value...
    See more | Go to post

  • unfortunately, I'm unable to use that compiler, my prof wants to be able to compile it on his machine to test it using the Dev-C++ IDE and compiler.
    See more | Go to post

    Leave a comment:


  • rolan
    started a topic istringstream and redefining the stream inside a for loop
    in C

    istringstream and redefining the stream inside a for loop

    I'm trying to figure out how to convert an array of type "string" into integers, and I have begun using istringstream.

    I made a program to test how istringstream works, and I've been having trouble updating the characters in the stream within a for loop.

    Here's a code snippet:
    Code:
     
        string some_string="15372";
        int a;
        istringstream buffer(some_string);
    ...
    See more | Go to post
No activity results to display
Show More
Working...