Click here to Skip to main content
15,890,438 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC - Printing - Changing page orientation from a custom pagesetup dialog Pin
Un Suthee3-Feb-11 16:30
Un Suthee3-Feb-11 16:30 
Question2D dynamic wchar array Pin
csrss31-Jan-11 13:30
csrss31-Jan-11 13:30 
AnswerRe: 2D dynamic wchar array Pin
Andrew Brock31-Jan-11 16:41
Andrew Brock31-Jan-11 16:41 
GeneralRe: 2D dynamic wchar array Pin
csrss31-Jan-11 22:35
csrss31-Jan-11 22:35 
AnswerRe: 2D dynamic wchar array [DONE] Pin
csrss1-Feb-11 2:25
csrss1-Feb-11 2:25 
AnswerRe: 2D dynamic wchar array [modified] Pin
Emilio Garavaglia31-Jan-11 20:50
Emilio Garavaglia31-Jan-11 20:50 
GeneralRe: 2D dynamic wchar array Pin
csrss31-Jan-11 22:45
csrss31-Jan-11 22:45 
QuestionString array comparison Pin
jharn31-Jan-11 4:48
jharn31-Jan-11 4:48 
Hey all, hope everyone had a great weekend.

I have some code where I am passing a string array and some numbers and want to reconcile the two as far as a lookup table. When I want to compare a value in an array to a value passed to the function it wants arg1 to be boolean, but I am not sure the proper syntax. can anyone give me an idea of what I am doing wrong? Also, I am not sure the code will work as written anyway, but this is the only error popping up so far.

double __stdcall HEI_F2(string &arg1, int &arg2)
{
int tp;
int bg;
int counter, typ, bwg, b;
string vl_reg1[16] = {"70-30 Cu-Ni", "90-10 Cu-Ni", "Admiralty Metal", "Aluminum Brass", "Aluminum Bronze", "Arsenical Copper", "Cold-Rolled Low Carbon Steel", "Copper Iron 194 (Olin 194)", "Titanium Grades 1 & 2", "304 SS", "316/317 SS", "N08367 (AL6XN)", "S43035 (TP439)", "S44660 (Sea-Cure)", "S44735 (AL29-4C)"};
string a;
int vl_reg2[10] = {12, 14, 16, 18, 20, 22, 23, 24, 25};
double vl_reg12[16] = {0.71, 0.8, 0.93, 0.92, 0.89, 0.98, 0.81, 1, 0.64, 0.54, 0.53, 0.48, 0.63, 0.58, 0.58};
double vl_reg14[16] = {0.78, 0.85, 0.96, 0.95, 0.93, 1, 0.86, 1.01, 0.71, 0.62, 0.61, 0.56, 0.71, 0.66, 0.66};
double vl_reg16[16] = {0.83, 0.89, 0.98, 0.97, 0.96, 1.01, 0.9, 1.02, 0.77, 0.69, 0.67, 0.63, 0.77, 0.72, 0.72};
double vl_reg18[16] = {0.88, 0.93, 1, 0.99, 0.98, 1.02, 0.94, 1.03, 0.83, 0.75, 0.74, 0.7, 0.82, 0.79, 0.79};
double vl_reg20[16] = {0.92, 0.96, 1.01, 1.01, 1, 1.03, 0.97, 1.03, 0.89, 0.82, 0.81, 0.78, 0.88, 0.85, 0.85};
double vl_reg22[16] = {0.95, 0.98, 1.02, 1.02, 1.01, 1.03, 0.98, 1.04, 0.91, 0.86, 0.85, 0.82, 0.91, 0.89, 0.89};
double vl_reg23[16] = {0.96, 0.99, 1.02, 1.02, 1.01, 1.04, 0.99, 1.04, 0.93, 0.88, 0.87, 0.84, 0.92, 0.9, 0.9};
double vl_reg24[16] = {0.97, 0.99, 1.03, 1.02, 1.02, 1.04, 1, 1.04, 0.94, 0.9, 0.89, 0.86, 0.94, 0.92, 0.92};
double vl_reg25[16] = {0.97, 1, 1.03, 1.03, 1.02, 1.04, 1, 1.04, 0.95, 0.91, 0.9, 0.88, 0.95, 0.93, 0.93};
string vl_reg3[16] = {"vl_reg12", "vl_reg14", "vl_reg16", "vl_reg18", "vl_reg20", "vl_reg22", "vl_reg23", "vl_reg24", "vl_reg25"};

counter = 0;
do{
a = vl_reg1[counter];
if (arg1 = a)
{
tp = counter;
}
counter = counter + 1;
}while (counter <= 16);

counter = 0;
do{
b = vl_reg2[counter];
if (tp = b)
{
bg = counter;
}
counter = counter + 1;
}while (counter <= 10);

return vl_reg3[bg][tp];
}
QuestionRe: String array comparison Pin
David Crow31-Jan-11 4:57
David Crow31-Jan-11 4:57 
AnswerRe: String array comparison Pin
jharn31-Jan-11 5:08
jharn31-Jan-11 5:08 
AnswerRe: String array comparison Pin
David Crow31-Jan-11 5:41
David Crow31-Jan-11 5:41 
GeneralRe: String array comparison Pin
jharn31-Jan-11 6:09
jharn31-Jan-11 6:09 
GeneralRe: String array comparison Pin
Matthew Barnett1-Feb-11 1:06
Matthew Barnett1-Feb-11 1:06 
AnswerRe: String array comparison Pin
jharn31-Jan-11 5:46
jharn31-Jan-11 5:46 
AnswerRe: String array comparison Pin
David Crow31-Jan-11 6:08
David Crow31-Jan-11 6:08 
GeneralRe: String array comparison Pin
jharn31-Jan-11 6:10
jharn31-Jan-11 6:10 
GeneralRe: String array comparison Pin
jharn31-Jan-11 9:03
jharn31-Jan-11 9:03 
GeneralRe: String array comparison Pin
jsc421-Feb-11 0:13
professionaljsc421-Feb-11 0:13 
QuestionRe: String array comparison Pin
David Crow1-Feb-11 8:51
David Crow1-Feb-11 8:51 
AnswerRe: String array comparison Pin
jsc421-Feb-11 23:36
professionaljsc421-Feb-11 23:36 
AnswerRe: String array comparison Pin
Niklas L31-Jan-11 12:31
Niklas L31-Jan-11 12:31 
GeneralRe: String array comparison Pin
jharn31-Jan-11 12:41
jharn31-Jan-11 12:41 
GeneralRe: String array comparison Pin
KP Lee1-Feb-11 2:22
KP Lee1-Feb-11 2:22 
GeneralRe: String array comparison Pin
jharn1-Feb-11 4:39
jharn1-Feb-11 4:39 
GeneralRe: String array comparison Pin
jharn1-Feb-11 5:04
jharn1-Feb-11 5:04 

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.