Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Convert CPP to C#

Posted on 2014-04-19
2
Medium Priority
?
398 Views
Last Modified: 2014-04-19
Hi..
Any idea how I can convert this to C#

struct extrema {
    int *mins, *maxes;
    extrema();
    ~extrema();
    void alloc(int size);
    void dealloc();
    void update(point prev, point cur);
} horizExtrema, vertExtrema;


I think it's something like  ?????

public class extrema
{

      public int mins;

      public int maxes;

      void update(point prev, point cur);
}
0
Comment
Question by:JElster
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 2000 total points
ID: 40010371
IMO that should be more like

public class extrema
{

      public int[] mins;

      public int[] maxes;

      public void alloc(int size)
      {
          mins = new int[size];
          maxes= new int[size];
      }
      // void dealloc(); <-- not needed in C#
      void update(point prev, point cur); // what is 'point' like?
} 

Open in new window

0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 40010459
Just to add to the last post. I imagine point would be System.Drawing.Point.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question