I think i posted this one in the wrong Forum, so i posted it in the SQL/ADO/ADO.NET forum and got my answer thanks to ToddHileHoffer.
Will use three tables, one for the "recipes", one for the "ingredients" and one for the "recipeingredients" and the relation will be between the recipes table and the recipeingredients table. Just in case anyone else was wandering.
I'm trying to create a class that I don't want anyone to be able to create a handle to, aside from another specific class. In native c++, I could this by just declaring the creator class as a friend to the class I'm restricting creation for. However, in C++/CLI, it won't allow me to have friends for a managed type.
Does anyone know how I could get around this problem?
The absence of friend classes is a real problem in .NET, IMO. I'm not sure there's a way around it, if you want the actual class visible, but not the ability to create. Does your class derive from anything right now ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
Hi! I'm learning about linked lists and have created the following class:
struct Node<br />
int data;<br />
Node *next;<br />
Node *prev;<br />
class BasicList<br />
/* CONSTRUCTORS / DESTRUCTORS */<br />
BasicList(); // Default Constructor<br />
/* INSERTION METHODS */<br />
void Prepend(int n); // Insert n into list as the first item<br />
void Append(int n); // Insert n into list as the last item<br />
void InsertAfter(int key, int n); // Insert n into list after key<br />
void InsertBefore(int key, int n); // Insert n into list before key<br />
void Swap(int first, int second); // Swap specified elements<br />
void Remove(int key); // Remove first occurance of key from list<br />
/* QUERY METHODS */<br />
void DisplayNodes() const; // Display the data item from each node in the list<br />
bool IsEmpty() const; // Return true if the list is empty<br />
int Maximum() const; // Return the largest member in the list<br />
int Minimum() const; // Return the smallest member in the list<br />
int Occurances(int key) const; // Return the number of occurances of key<br />
int NumNodes() const; // Return the number of nodes in the list<br />
/* HELPER FUNCTIONS */<br />
Node *GetAddress(int n); // Returns the address of the first instance of n found in list<br />
int *GetDataArray(); // Return a pointer to an array containing the data. Last item in array is NULL<br />
/* MEMBERS */<br />
Node *head; // pointer to empty head node<br />
Node *tail; // pointer to empty tail node<br />
All the functions work wonderfully so far. I want to add a method that will sort the linked list data. I'm not really sure where to begin. I checked Wikipedia, and found the following URL which presents a MergeSort algorithm. I'm not sure if this is the best way. Any opinions?
We are planning to work on a project. The client side will be created with VB.net. This VB.net will call the backend of c code. I did the similar thing with php to call the backend of c code. The bridge between the php and c code was created with php extension for wrapping c code. Could you give a suggestion what kind of bridge will be created between VB.net and c code?
Thank you very much for your any suggestion
Last Visit: 26-Nov-20 14:43 Last Update: 26-Nov-20 14:43