Click here to Skip to main content
15,912,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: copying selected items Pin
Galatei13-Oct-06 3:00
Galatei13-Oct-06 3:00 
GeneralRe: copying selected items Pin
Mark Salsbery13-Oct-06 6:29
Mark Salsbery13-Oct-06 6:29 
GeneralRe: copying selected items Pin
radhika2813-Oct-06 18:40
radhika2813-Oct-06 18:40 
GeneralRe: copying selected items Pin
Mark Salsbery14-Oct-06 7:18
Mark Salsbery14-Oct-06 7:18 
QuestionI want to open a notepad from my application without disappearing it. Pin
Pham duc an13-Oct-06 2:30
Pham duc an13-Oct-06 2:30 
AnswerRe: I want to open a notepad from my application without disappearing it. Pin
Galatei13-Oct-06 2:55
Galatei13-Oct-06 2:55 
QuestionRe: I want to open a notepad from my application without disappearing it. Pin
David Crow13-Oct-06 3:50
David Crow13-Oct-06 3:50 
QuestionUrgent :Regarding pointer to a pointer Pin
janadhana13-Oct-06 2:22
janadhana13-Oct-06 2:22 
My project code is same as below. In the below code i get an exception when i delete the amount.
Please kindly tell me what exactly is wrong in the below code.
I should be able to use the values and also delete it.

#include "stdafx.h"
#include "iostream.h"
#include "iomanip.h"
#include <algorithm>
#include <vector>

void fun(long **a);
int main(int argc, char* argv[])
{

long *amount = NULL;
fun(&amount);

for (int i = 0; i<5 ;++i,++amount)
{
cout<< *amount <<endl;
}
="" delete="" amount;="" i="" get="" an="" exception="" here.
="" return="" 0;
}

void="" fun(long="" **a)
{
="" *a="new" long[5];
=""
="" std::vector<long=""> var;
var.push_back(5);
var.push_back(6);
var.push_back(65);
var.push_back(58);
var.push_back(57);
std::vector<long>::iterator i;
int k = 0;
for(i= var.begin();i != var.end();++k, ++i)
{
a[k] = new long;
(*a)[k] = *i;
}
}

Thanks in advance!


Thanks & Regards,
Dhana

AnswerRe: Urgent :Regarding pointer to a pointer Pin
Galatei13-Oct-06 2:44
Galatei13-Oct-06 2:44 
GeneralRe: Urgent :Regarding pointer to a pointer Pin
janadhana13-Oct-06 4:51
janadhana13-Oct-06 4:51 
AnswerRe: Urgent :Regarding pointer to a pointer [modified] Pin
prasad_som13-Oct-06 3:07
prasad_som13-Oct-06 3:07 
GeneralRe: Urgent :Regarding pointer to a pointer Pin
janadhana13-Oct-06 4:52
janadhana13-Oct-06 4:52 
GeneralRe: Urgent :Regarding pointer to a pointer Pin
prasad_som13-Oct-06 4:59
prasad_som13-Oct-06 4:59 
AnswerRe: Urgent :Regarding pointer to a pointer Pin
David Crow13-Oct-06 3:53
David Crow13-Oct-06 3:53 
GeneralRe: Urgent :Regarding pointer to a pointer Pin
Galatei13-Oct-06 4:09
Galatei13-Oct-06 4:09 
GeneralRe: Urgent :Regarding pointer to a pointer Pin
David Crow13-Oct-06 4:14
David Crow13-Oct-06 4:14 
QuestionQuestion Pin
messages13-Oct-06 1:50
messages13-Oct-06 1:50 
AnswerRe: Question Pin
prasad_som13-Oct-06 2:10
prasad_som13-Oct-06 2:10 
AnswerRe: Question Pin
David Crow13-Oct-06 3:46
David Crow13-Oct-06 3:46 
QuestionNeed to open Particular page or topic of help file Pin
Krishnatv13-Oct-06 1:06
Krishnatv13-Oct-06 1:06 
AnswerRe: Need to open Particular page or topic of help file Pin
Hamid_RT13-Oct-06 1:30
Hamid_RT13-Oct-06 1:30 
GeneralRe: Need to open Particular page or topic of help file Pin
Krishnatv13-Oct-06 1:37
Krishnatv13-Oct-06 1:37 
AnswerRe: Need to open Particular page or topic of help file Pin
David Crow13-Oct-06 3:43
David Crow13-Oct-06 3:43 
QuestionHow to add text data in avi file? Pin
Hemant kulkarni13-Oct-06 0:43
Hemant kulkarni13-Oct-06 0:43 
AnswerRe: How to add text data in avi file? Pin
Hamid_RT13-Oct-06 0:49
Hamid_RT13-Oct-06 0:49 

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.