Click here to Skip to main content
15,885,546 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: GetWindowRect wrong dimensions Pin
Richard MacCutchan30-Mar-20 2:31
mveRichard MacCutchan30-Mar-20 2:31 
Questionc++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 4:10
ccodebase19-Feb-20 4:10 
AnswerRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 4:40
mveRichard MacCutchan19-Feb-20 4:40 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 5:52
ccodebase19-Feb-20 5:52 
GeneralRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 6:21
mveRichard MacCutchan19-Feb-20 6:21 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 7:26
ccodebase19-Feb-20 7:26 
GeneralRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 21:57
mveRichard MacCutchan19-Feb-20 21:57 
GeneralRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 6:35
mveRichard MacCutchan19-Feb-20 6:35 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 7:25
ccodebase19-Feb-20 7:25 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 7:57
ccodebase19-Feb-20 7:57 
Questionupper bounds equivalent Pin
ccodebase19-Feb-20 3:54
ccodebase19-Feb-20 3:54 
QuestionHow to remove a non-ascii character from CString Pin
Erich Ruth1-Jan-20 9:19
Erich Ruth1-Jan-20 9:19 
AnswerRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 13:27
professionalphil.o1-Jan-20 13:27 
GeneralRe: How to remove a non-ascii character from CString Pin
Erich Ruth1-Jan-20 14:42
Erich Ruth1-Jan-20 14:42 
GeneralRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 14:56
professionalphil.o1-Jan-20 14:56 
AnswerRe: How to remove a non-ascii character from CString Pin
Eddy Vluggen1-Jan-20 13:30
professionalEddy Vluggen1-Jan-20 13:30 
GeneralRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 14:56
professionalphil.o1-Jan-20 14:56 
GeneralRe: How to remove a non-ascii character from CString Pin
Eddy Vluggen1-Jan-20 15:55
professionalEddy Vluggen1-Jan-20 15:55 
QuestionC++ control textBox of Form1 and Form2 Pin
HeeMongKorea29-Dec-19 20:07
professionalHeeMongKorea29-Dec-19 20:07 
AnswerRe: C++ control textBox of Form1 and Form2 Pin
Richard MacCutchan29-Dec-19 22:05
mveRichard MacCutchan29-Dec-19 22:05 
GeneralRe: C++ control textBox of Form1 and Form2 Pin
HeeMongKorea16-Jan-20 0:29
professionalHeeMongKorea16-Jan-20 0:29 
Questionwidows api setwindowpos with SWP_HIDEWINDOW not always works Pin
viewlucc28-Nov-19 14:04
viewlucc28-Nov-19 14:04 
QuestionCan Someone please convert this from C++ to C? Topic : "Placement of Signal Boosters Using Tree Data Structures." Pin
ManojMaheshPatil15-Nov-19 22:35
ManojMaheshPatil15-Nov-19 22:35 
// place signal boosters

#include <iostream>
#include "booster.h"
#include "linkedBinaryTree.h"

using namespace std;

int tolerance = 3;

void placeBoosters(binaryTreeNode<booster> *x)
{// Compute degradation at *x. Place booster
// here if degradation exceeds tolerance.

x->element.degradeToLeaf = 0; // initialize degradation at x

// compute degradation from left subtree of x and
// place a booster at the left child of x if needed
binaryTreeNode<booster> *y = x->leftChild;
if (y != NULL)
{// x has a nonempty left subtree
int degradation = y->element.degradeToLeaf +
y->element.degradeFromParent;
if (degradation > tolerance)
{// place a booster at y
y->element.boosterHere = true;
x->element.degradeToLeaf = y->element.degradeFromParent;
}
else // no booster needed at y
x->element.degradeToLeaf = degradation;
}

// compute degradation from right subtree of x and
// place a booster at the right child of x if needed
y = x->rightChild;
if (y != NULL)
{// x has a nonempty right subtree
int degradation = y->element.degradeToLeaf +
y->element.degradeFromParent;
if (degradation > tolerance)
{// place booster at y
y->element.boosterHere = true;
degradation = y->element.degradeFromParent;
}
if (x->element.degradeToLeaf < degradation)
x->element.degradeToLeaf = degradation;
}
}

int main(void)
{
booster a, b;
a.degradeFromParent = 2;
a.degradeToLeaf =0;
a.boosterHere = 0;
b.degradeFromParent=1;
b.degradeToLeaf=0;
b.boosterHere = 0;

linkedBinaryTree<booster> t, u, v, w, x, y;
u.makeTree(a,x,x);
v.makeTree(b,u,x);
u.makeTree(a,x,x);
w.makeTree(a,u,x);

b.degradeFromParent=3;
u.makeTree(b,v,w);
v.makeTree(a,x,x);

b.degradeFromParent=3;
w.makeTree(b,x,x);
y.makeTree(a,v,w);
w.makeTree(a,x,x);
t.makeTree(b,y,w);

b.degradeFromParent=0;
v.makeTree(b,t,u);

v.postOrder(placeBoosters);
v.postOrderOutput();

return 0;
}
AnswerRe: Can Someone please convert this from C++ to C? Topic : "Placement of Signal Boosters Using Tree Data Structures." Pin
Dave Kreskowiak16-Nov-19 4:59
mveDave Kreskowiak16-Nov-19 4:59 
QuestionGenerate the equivalent of a DLL: a .netmodule Pin
Wim Hoeks16-Sep-19 9:28
Wim Hoeks16-Sep-19 9:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.