Thanks for your help
Type: Posts; User: hebali
Thanks for your help
Sorry, I just caught onto what that element is for...
I was assuming I would supply my own string getting function, but then you handed me the above code, with which I was unfamiliar, and I thought...
So why call it?
What is that function:
size_t get_user_file_path(char *buffer, size_t size, const char *user)
{
return snprintf(buffer, size, "/%s/Desktop/database.txt", user);
}
It doesn't take user...
in trying to compile
size_t get_user_file_path(char *buffer, size_t size, const char *user)
{
return snprintf(buffer, size, "/%s/Desktop/database.txt", user);
}
I get error "nested...
Yes, I guess so.
But I didn't understand the formatting of Master's example.
Sorry
What?
Sorry, new to this...
master5001, i know how to change directories, but is it not possible to do with a:
Take user input, assigned to variable INPUT, and then write the file to:
"~/INPUT/whatever.txt"
formatting?
That's what I want to do...
what would the formatting of that look like in terms of:
"FILE *fp = fopen("/Users/Desktop/database.txt", "w");
And I would prefer to do this without a system command such as cwd...
Yes, but what if rather than predefining the location such as: "~/Desktop/whatever.txt"
I want the program to first take user input, assigned to variable INPUT, and then write the file to:...
Naturally, the value of Directory1 would be a string...
Hi,
I am using the following code, which successfully writes a file to the location below...
FILE *fp = fopen("/Users/me/Desktop/database456abcXa.txt", "w");
if (fp != NULL)
{...
Excellent, thank you
Ahhh. why is it rounding?
In the following code:
float FOO;
FOO = 1.79;
int BAR = FOO * 100;
Question:
Let's say I've got the structs in place as seen above. And then I implement a triangle (which contains 3 points: x, y, z)
If I perform operations with this, can I work with all three...
you both rule
Yikes, sorry... one more question...
earlier you used a loop to input (with k as loop variable):
within this, I need something to the effect of "&myCube.v[k].x" rather than "&myCube.v0.x"
It...
yes, thanks. your implementation of DoesIntersect is perfect. The only confusion was this:
Before DoesIntersect is ever called in the main, a user inputs the vertices of a cube.
These are operated...
one more question for now:
If I define the following
typedef struct
{
double x;
double y;
double z;
} vertex;
Thanks so much for your help.
It's actually not for an assignment. I'm not in a class... which makes it harder.
But I do think I understand the ideas you're implementing and I will put them into...
Thanks, this is great... and I do understand what you're doing... but there is one problem:
Here is the flow: (and why the user is not actually inputting triangles)
Program flow:
1) User...
so, is this what you meant?
I'm not exactly sure how to implement DoesIntersect as a function.
Do I want "void" in its parenthesis... where do I define what variables can be passed values...?
...
Yes, sorry. The main is currently my general intersection checker. But as you suggested, I don't want that to be in the main but rather as a function: DoesIntersect()
Your implementation was right...