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...
User Profile
Collapse
-
OSP (Operating Systems Programming)
-
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.... -
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.Leave a comment:
-
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.Leave a comment:
-
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[]){ -
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... -
-
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... -
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?Leave a comment:
-
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... -
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... -
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.Leave a comment:
-
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);
No activity results to display
Show More
Leave a comment: