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

Managed C++/CLI

 
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 
Questionprogramming an SDI drawing application with MFC in VC++ Pin
Member 1449477212-Sep-19 5:01
Member 1449477212-Sep-19 5:01 
AnswerRe: programming an SDI drawing application with MFC in VC++ Pin
Richard MacCutchan12-Sep-19 5:07
mveRichard MacCutchan12-Sep-19 5:07 
GeneralRe: programming an SDI drawing application with MFC in VC++ Pin
Member 1449477212-Sep-19 5:21
Member 1449477212-Sep-19 5:21 
GeneralRe: programming an SDI drawing application with MFC in VC++ Pin
Member 1449477212-Sep-19 6:48
Member 1449477212-Sep-19 6:48 
GeneralRe: programming an SDI drawing application with MFC in VC++ Pin
Richard MacCutchan12-Sep-19 6:51
mveRichard MacCutchan12-Sep-19 6:51 
Questionadd prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks9-Sep-19 19:30
TH_Raksdsks9-Sep-19 19:30 
AnswerRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
OriginalGriff9-Sep-19 19:36
mveOriginalGriff9-Sep-19 19:36 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks9-Sep-19 20:33
TH_Raksdsks9-Sep-19 20:33 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
OriginalGriff9-Sep-19 21:28
mveOriginalGriff9-Sep-19 21:28 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks10-Sep-19 2:14
TH_Raksdsks10-Sep-19 2:14 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
OriginalGriff10-Sep-19 2:24
mveOriginalGriff10-Sep-19 2:24 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks16-Sep-19 23:20
TH_Raksdsks16-Sep-19 23:20 
GeneralMessage Closed Pin
7-Oct-19 21:50
Member 146157057-Oct-19 21:50 
QuestionHow to write a application for auto detect new HDD on windows 10 Pin
unitedcamau201915-Jul-19 17:23
unitedcamau201915-Jul-19 17:23 
AnswerRe: How to write a application for auto detect new HDD on windows 10 Pin
Richard MacCutchan15-Jul-19 21:12
mveRichard MacCutchan15-Jul-19 21:12 

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.