 CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

# Search:

Type: Posts; User: lab1

1. ## Thread: How to calculate points of a Pentagon?

by lab1
Replies
5
Views
5,808

### Re: How to calculate points of a Pentagon?

Hmm.. I know I said "Pentagon" but I meant "Upside-down homeplate"

Do you know how to draw that?

Thanks

by lab1
Replies
7
Views
1,433

Thanks

by lab1
Replies
7
Views
1,433

Thanks

by lab1
Replies
7
Views
1,433

Thanks!
5. ## Thread: calculating a point from an origin give distance and angle, what am I doing wrong?

by lab1
Replies
7
Views
1,433

### calculating a point from an origin give distance and angle, what am I doing wrong?

Hello,

Below is sample code to calculate a point from an origin point, given the distance and angle. Thanks!!

by lab1
Replies
3
Views
637

Thanks!

by lab1
Replies
6
Views
2,586

Thanks!
8. ## Thread: how to calculate the points of a pentagon given the center?

by lab1
Replies
2
Views
2,816

### how to calculate the points of a pentagon given the center?

Hello,

I have one XY Point that should be the center of a pentagon.
I want the length of each side to be 20.
This is a Cartesian Coordinate System.
I also want the tip on the pentagon to be...
9. ## Thread: How to calculate points of a Pentagon?

by lab1
Replies
5
Views
5,808

### Re: How to calculate points of a Pentagon?

So basically I am just looking for a simple C++ way to calculate the points:

So how can I convert this to basic C++:

array<Point> ^pts = gcnew array<Point>(6);
for (int i = 0; i < 6; ++i)
...
10. ## Thread: given a startPoint, range and bearing, can I calculate the other point?

by lab1
Replies
6
Views
2,586

### Re: given a startPoint, range and bearing, can I calculate the other point?

So would this algorithm be correct:

X2=X1+(cos(angle)*distance)
Y2=Y1+(sin(angle)*distance)

Thanks!
11. ## Thread: How to calculate points of a Pentagon?

by lab1
Replies
5
Views
5,808

### How to calculate points of a Pentagon?

need to draw pentagon
12. ## Thread: given a startPoint, range and bearing, can I calculate the other point?

by lab1
Replies
6
Views
2,586

### given a startPoint, range and bearing, can I calculate the other point?

I want to calculate the other point in a Cartesian Coordinate system. How can I do that?

Thanks!
13. ## Thread: coordinate system math questions

by lab1
Replies
3
Views
637

### coordinate system math questions

Hello,

I have a coordinate system

Thanks!
14. ## Thread: How to use std::string with GetCurrentDirectory()?

by lab1
Replies
7
Views
5,233

### Re: How to use std::string with GetCurrentDirectory()?

hmm I changed it, but now my program just failed with a box that says "Failed to create empty document"

any idea why?

Thanks
15. ## Thread: How to use std::string with GetCurrentDirectory()?

by lab1
Replies
7
Views
5,233

### Re: How to use std::string with GetCurrentDirectory()?

I also tried this code:

int mpath =1000;
std::string str(mpath+1, 0);
GetCurrentDirectory(mpath, &str);

but I get this error:
16. ## Thread: How to use std::string with GetCurrentDirectory()?

by lab1
Replies
7
Views
5,233

### How to use std::string with GetCurrentDirectory()?

Hello all,

I have the following code that works in Debug mode in my program, but not in Release mode:

CString dir;
GetCurrentDirectory(1000, dir.GetBufferSetLength(1000));
string path =...

by lab1
Replies
3
Views
623

### problems adding 2 CString's together

Hello,

Below is the code which gives me the error:

CString temp1, path;
GetCurrentDirectory(1000, temp1.GetBufferSetLength(1000));
path = temp1 + "\\subdir\\test1.jpg";
18. ## Thread: point calculation help

by lab1
Replies
2
Views
467

### point calculation help

Hello,

I have 2 points and I need help calculating a third point. These points are in a cartesian coordinate system. Basically Given the 1st point in a line, and the midpoint, how can I calculate...

by lab1
Replies
2
Views
594

thanks :)

by lab1
Replies
2
Views
594

Hello,

I am using a CWinThread in my class, and I have the method below in my .h file that is generating a compilation error:

static UNIT Begin(LPVOID param);

I get the error:

syntax...

by lab1
Replies
5
Views
1,738

I love how you insult me while you answer my questions :) It makes me work very much harder to someday be smart as you, or smarter! Thank you!

by lab1
Replies
5
Views
1,738

Hello,

I want to add an angle to another angle and if it is larger than 360 degrees, wrap the result. For example:

angle1 = 300
angle2 = 90
angle1 + angle2 = 30

How can I do this?
23. ## Thread: vector<string> help needed

by lab1
Replies
4
Views
657

### vector help needed

Hello,

I have a "vector<string> stringVec"and here is what I want to do:

Read 10 messages from stringVec to stringVec. Then remove these and move stringVec down to stringVec and so...

by lab1
Replies
17
Views
2,691

### Re: endianness questions

There is a part in the standard that species that you must be able to memcpy structures to char *' and vice versa which would prohibit any type of padding in the structures.
25. ## Thread: another endianess question

by lab1
Replies
7
Views
790

### Re: another endianess question

They cant be noops, because they flip the bytes.
Results 1 to 25 of 1033 