Click here to Skip to main content
15,905,785 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Transparent control Pin
MemLeak23-May-03 3:11
MemLeak23-May-03 3:11 
GeneralRe: Transparent control Pin
basementman23-May-03 4:02
basementman23-May-03 4:02 
GeneralRe: Transparent control Pin
MemLeak23-May-03 4:53
MemLeak23-May-03 4:53 
GeneralAny link to a Free ebook about Drivers Pin
Fad B23-May-03 2:40
Fad B23-May-03 2:40 
GeneralHide passwords... Pin
rohit.dhamija23-May-03 2:11
rohit.dhamija23-May-03 2:11 
GeneralRe: Hide passwords... Pin
G. Steudtel23-May-03 3:12
G. Steudtel23-May-03 3:12 
GeneralRe: Hide passwords... Pin
jhwurmbach23-May-03 3:34
jhwurmbach23-May-03 3:34 
Generalerrors! Pin
flora_k23-May-03 0:59
flora_k23-May-03 0:59 
Hi,
i have plenty of errors in my code. Help Plz


void trl_calculation(int amount, unsigned char*pData, unsigned char sl)
{

unsigned char NrTrlValues;
unsigned char location;
unsigned char perc;
unsigned char time;
unsigned char *realTrlValues = NULL;;

pTrlValues = (unsigned char*) malloc(amount*sizeof(unsigned char)); //error C2440, error C2106:

for (int i=1; i < amount; i++)
{
pTrlValues[i] = (unsigned char) pData[location]; //error C2109:
if

((pData[location] - sl < 0) && (pData[location + 1] - sl ) > 0)||
((pData[location] - sl > 0) && (pData[location +1 ] - sl < 0)) //error C2143

perc = (sl - pData[location])/(pData[location + 1]) - pData[location];
time = location * 0.00000001923 + (((location * 0.00000001923) + 1) - (location * 0.00000001923))* perc;
//warning C4244

if
pData[location] - sl =0;//error C2061
pTrlValues [i] = location * 0.00000001923;//error C2109, warning 4244,error C2106:

realTrlValues[i] = pTrlValues[i+1] - pTrlValues[i];
//error C2106,arning4244

}
}

void histogram (long amount,unsigned char pTrlValues,unsigned char NrTrlValues)

{
int i_index;
const double Duration = amount/4096;
double histogram_ram[4096];
pTrlValues = (unsigned char*) malloc(amount*sizeof(unsigned char));//error C2440


for (int i=1; i <= amount; i++)
{
i_index = static_cast< unsigned int >(ceil(pTrlValues[i]/Duration)) + 1;//error C2109
histogram_ram[i_index]=histogram_ram[i_index]+1;

}
}


error C2440: '=' : cannot convert from 'unsigned char *' to 'unsigned char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
error C2109: subscript requires array or pointer type
error C2106: '=' : left operand must be l-value
error C2143: syntax error : missing ';' before '||'
warning C4244: '=' : conversion from 'double' to 'unsigned char', possible loss of data
error C2061: syntax error : identifier 'pData'
error C2109: subscript requires array or pointer type
warning C4244: '=' : conversion from 'double' to 'unsigned char', possible loss of data
error C2106: '=' : left operand must be l-value
error C2109: subscript requires array or pointer type
(625) : error C2109: subscript requires array or pointer type
warning C4244: '=' : conversion from 'int' to 'unsigned char', possible loss of data
error C2440: '=' : cannot convert from 'unsigned char *' to 'unsigned char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
error C2109: subscript requires array or pointer type


F.K
GeneralRe: errors! Pin
jhwurmbach23-May-03 1:05
jhwurmbach23-May-03 1:05 
GeneralRe: errors! Pin
flora_k23-May-03 1:09
flora_k23-May-03 1:09 
GeneralRe: errors! Pin
jhwurmbach23-May-03 1:38
jhwurmbach23-May-03 1:38 
GeneralRe: errors! Pin
Rage23-May-03 1:47
professionalRage23-May-03 1:47 
GeneralRe: errors! Pin
flora_k23-May-03 2:59
flora_k23-May-03 2:59 
GeneralRe: errors! [modified] Pin
Rage23-May-03 3:09
professionalRage23-May-03 3:09 
GeneralRe: errors! Pin
Rage23-May-03 1:27
professionalRage23-May-03 1:27 
GeneralRecordSets &amp;&amp; DataSets Pin
NHM23-May-03 0:14
NHM23-May-03 0:14 
GeneralRe: RecordSets &amp;&amp; DataSets Pin
Alexandru Savescu23-May-03 6:05
Alexandru Savescu23-May-03 6:05 
Generalhelp! Pin
flora_k22-May-03 23:56
flora_k22-May-03 23:56 
GeneralRe: help! Pin
Rage23-May-03 1:42
professionalRage23-May-03 1:42 
Questionwhat have I deleted? :=&lt; Pin
ilavl22-May-03 23:33
ilavl22-May-03 23:33 
AnswerRe: what have I deleted? :=&lt; Pin
Rickard Andersson2023-May-03 0:04
Rickard Andersson2023-May-03 0:04 
GeneralDisabled mini-bar in Developer Studio Pin
JensB22-May-03 23:31
JensB22-May-03 23:31 
QuestionCan Anyone Help me on OLE Drag&amp;Drop In MFC Pin
ccdai22-May-03 23:15
ccdai22-May-03 23:15 
GeneralSomething really strange !! Pin
Cedric Moonen22-May-03 21:44
Cedric Moonen22-May-03 21:44 
GeneralRe: Something really strange !! Pin
Rage22-May-03 23:07
professionalRage22-May-03 23:07 

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.