Click here to Skip to main content
15,903,540 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questionplzzzzz i need your help ~! Pin
china.net7-Dec-06 19:45
china.net7-Dec-06 19:45 
AnswerRe: plzzzzz i need your help ~! Pin
prasad_som7-Dec-06 19:54
prasad_som7-Dec-06 19:54 
GeneralRe: plzzzzz i need your help ~! Pin
china.net7-Dec-06 20:05
china.net7-Dec-06 20:05 
QuestionHow to catch the message of right click in IE Pin
gzcjun7-Dec-06 17:32
gzcjun7-Dec-06 17:32 
AnswerRe: How to catch the message of right click in IE Pin
prasad_som11-Dec-06 2:34
prasad_som11-Dec-06 2:34 
GeneralRe: How to catch the message of right click in IE Pin
Robert Wang198316-Sep-08 17:04
Robert Wang198316-Sep-08 17:04 
QuestionA stranage problem about stl vector. Pin
YangHenry7-Dec-06 16:29
YangHenry7-Dec-06 16:29 
AnswerRe: A stranage problem about stl vector. Pin
YangHenry7-Dec-06 16:33
YangHenry7-Dec-06 16:33 
The source code is as follows.

#include "stdafx.h"
#include <stdio.h>
#include <vector>

#define _CRTDBG_MAP_ALLOC
#include<stdlib.h>
#include<crtdbg.h>

typedef struct ipqam
{
char szName[50];
char szIpAddr[50];
char szDistrictName[50];
char szNote[255];
}IPQAM;

typedef struct freqpoint
{
char szName[50];

// added by yangyi,2006-8-23
int Modulate;

int Freq;
int Symbolrate;
char szNote[255];

}FREQPOINT;



/*
****************************************************************
struct : interfreqpoint
****************************************************************
*/
typedef struct interfreqpoint
{
FREQPOINT freqpoint;
// CSrmCritSec sec;


interfreqpoint();
interfreqpoint(const interfreqpoint & obj);

~interfreqpoint();

interfreqpoint & operator=(const interfreqpoint & obj);
}INTERFREQPOINT;


interfreqpoint::~interfreqpoint()
{

}

/*
function : constructor
*/
interfreqpoint::interfreqpoint(const interfreqpoint & obj)
{
*this = obj;
}

/*
function : constructor
*/
interfreqpoint::interfreqpoint()
{
this->freqpoint.Freq = 0;
this->freqpoint.Modulate = 0;
this->freqpoint.Symbolrate = 0;
this->freqpoint.szName[0] = 0;
this->freqpoint.szNote[0] = 0;
}

/*
function : overload =
*/
interfreqpoint & interfreqpoint::operator=(const interfreqpoint & obj)
{
strcpy(freqpoint.szName,obj.freqpoint.szName);
strcpy(freqpoint.szNote,obj.freqpoint.szNote);
freqpoint.Freq = obj.freqpoint.Freq;
freqpoint.Modulate = obj.freqpoint.Modulate;
freqpoint.Symbolrate = obj.freqpoint.Symbolrate;
return * this;
}

/*
****************************************************************
struct : interipqam
****************************************************************
*/
typedef struct interipqam
{
IPQAM qam;
std::vector<interfreqpoint> freqpointarray;
// CSrmCritSec sec;


interipqam(const interipqam & obj);

interipqam();

~interipqam();

interipqam & operator=(const interipqam & obj);

}INTERIPQAM;


interipqam::interipqam(const interipqam & obj)
{
*this = obj;
}

interipqam::~interipqam()
{
freqpointarray.clear();
}


interipqam::interipqam()
{
qam.szDistrictName[0] = 0;
qam.szIpAddr[0] = 0;
qam.szName[0] = 0;
qam.szNote[0] = 0;
}


interipqam & interipqam::operator=(const interipqam & obj)
{

INTERFREQPOINT objFp;
int nCnt = obj.freqpointarray.size(),nLoop = 0;

strcpy(qam.szDistrictName,obj.qam.szDistrictName);
strcpy(qam.szIpAddr,obj.qam.szIpAddr);
strcpy(qam.szNote,obj.qam.szNote);
strcpy(qam.szName,obj.qam.szName);


freqpointarray.clear();

for(nLoop = 0;nLoop < nCnt; nLoop++)
{
objFp = obj.freqpointarray.at(nLoop);
freqpointarray.push_back(objFp);
}


return *this;
}


int main(int argc, char* argv[])
{
_CrtDumpMemoryLeaks();

printf("Hello World!\n");
return 0;
}

yangyi

GeneralRe: A stranage problem about stl vector. Pin
YangHenry7-Dec-06 16:36
YangHenry7-Dec-06 16:36 
AnswerRe: A stranage problem about stl vector. Pin
Stuart Dootson7-Dec-06 21:11
professionalStuart Dootson7-Dec-06 21:11 
GeneralRe: A stranage problem about stl vector. Pin
YangHenry7-Dec-06 22:15
YangHenry7-Dec-06 22:15 
GeneralRe: A stranage problem about stl vector. Pin
Stuart Dootson8-Dec-06 0:37
professionalStuart Dootson8-Dec-06 0:37 
Questionhelp me! I don't obtain the point of IHTMLElement through IHTMLDOMNode! why? [modified] Pin
guti_milan7-Dec-06 16:06
guti_milan7-Dec-06 16:06 
QuestionWeb deployment Pin
Polity4h6-Dec-06 10:53
Polity4h6-Dec-06 10:53 
AnswerRe: Web deployment Pin
hanmengguo7-Dec-06 15:12
hanmengguo7-Dec-06 15:12 
GeneralRe: Web deployment Pin
Polity4h8-Dec-06 3:26
Polity4h8-Dec-06 3:26 
QuestionHelp, How to make a Window to behave like a dialog without using dialog resource? Pin
Skywalker20084-Dec-06 3:43
Skywalker20084-Dec-06 3:43 
AnswerRe: Help, How to make a Window to behave like a dialog without using dialog resource? Pin
Alain Rist5-Dec-06 16:53
Alain Rist5-Dec-06 16:53 
QuestionSTL list and sort Pin
neilsolent1-Dec-06 8:18
neilsolent1-Dec-06 8:18 
AnswerRe: STL list and sort Pin
led mike1-Dec-06 8:36
led mike1-Dec-06 8:36 
GeneralRe: STL list and sort Pin
neilsolent1-Dec-06 9:57
neilsolent1-Dec-06 9:57 
GeneralRe: STL list and sort Pin
Stuart Dootson2-Dec-06 14:10
professionalStuart Dootson2-Dec-06 14:10 
GeneralRe: STL list and sort Pin
Zac Howland5-Dec-06 9:36
Zac Howland5-Dec-06 9:36 
AnswerRe: STL list and sort Pin
Sceptic Mole1-Dec-06 8:42
Sceptic Mole1-Dec-06 8:42 
GeneralRe: STL list and sort Pin
neilsolent1-Dec-06 9:58
neilsolent1-Dec-06 9:58 

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.