Sending data from vector into and array
-
I stored the data in structure and placed it into a vector. However i need to upload this data through web service to the server and this happend for every 5 mins(i used a waitable timer).thus i used an array and send the data from vector to an array LogInfo *Info = new LogInfo [m_vectStruct.size()]; for (int j = 0; j < m_vectStruct.size(); ++j) { ThreatInfo[j] = m_vectStruct.at(j); } However the data is going beyong 800MB and becoz of this the network is getting blocked. Thus please let me know how can i send the data from vector to an array even if the size of the data is more than 3GB??? I Even Used the below code but of no use. copy ( m_vectStruct.begin(), m_vectStruct.end() , &Info ); Please help its bit urgent... Thanks in Advance
-
I stored the data in structure and placed it into a vector. However i need to upload this data through web service to the server and this happend for every 5 mins(i used a waitable timer).thus i used an array and send the data from vector to an array LogInfo *Info = new LogInfo [m_vectStruct.size()]; for (int j = 0; j < m_vectStruct.size(); ++j) { ThreatInfo[j] = m_vectStruct.at(j); } However the data is going beyong 800MB and becoz of this the network is getting blocked. Thus please let me know how can i send the data from vector to an array even if the size of the data is more than 3GB??? I Even Used the below code but of no use. copy ( m_vectStruct.begin(), m_vectStruct.end() , &Info ); Please help its bit urgent... Thanks in Advance
Instead of using a waitable timer, why can't you choose a limit on the number of elements in the vector and upload it as soon as it hits this limit? Also, what's with copying stuff into an array and all? I don't get the idea.
It is a crappy thing, but it's life -^ Carlo Pallini
-
I stored the data in structure and placed it into a vector. However i need to upload this data through web service to the server and this happend for every 5 mins(i used a waitable timer).thus i used an array and send the data from vector to an array LogInfo *Info = new LogInfo [m_vectStruct.size()]; for (int j = 0; j < m_vectStruct.size(); ++j) { ThreatInfo[j] = m_vectStruct.at(j); } However the data is going beyong 800MB and becoz of this the network is getting blocked. Thus please let me know how can i send the data from vector to an array even if the size of the data is more than 3GB??? I Even Used the below code but of no use. copy ( m_vectStruct.begin(), m_vectStruct.end() , &Info ); Please help its bit urgent... Thanks in Advance
brucewayn wrote:
this happend for every 5 mins
brucewayn wrote:
However the data is going beyong 800MB and becoz of this the network is getting blocked.
Not sure we have the entire picture, but based on that picture there might be a need to send the data in smaller segments rather than sending all of it every 5 minutes.
-
I stored the data in structure and placed it into a vector. However i need to upload this data through web service to the server and this happend for every 5 mins(i used a waitable timer).thus i used an array and send the data from vector to an array LogInfo *Info = new LogInfo [m_vectStruct.size()]; for (int j = 0; j < m_vectStruct.size(); ++j) { ThreatInfo[j] = m_vectStruct.at(j); } However the data is going beyong 800MB and becoz of this the network is getting blocked. Thus please let me know how can i send the data from vector to an array even if the size of the data is more than 3GB??? I Even Used the below code but of no use. copy ( m_vectStruct.begin(), m_vectStruct.end() , &Info ); Please help its bit urgent... Thanks in Advance
brucewayn wrote:
thus i used an array and send the data from vector to an array
Does the vector get cleared periodically? If not, then...why bother? Underneath the covers, a vector == an array.
brucewayn wrote:
Thus please let me know how can i send the data from vector to an array even if the size of the data is more than 3GB???
For a start with a 64bit OS and 8GB+ of RAM? Can you give some more information about what you're trying to achieve, what the context is, 'cause from what you've given us, I'm baffled by what you're doing.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p