Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can i input from file using i/o with getline Pin
CPallini10-Apr-09 0:56
mveCPallini10-Apr-09 0:56 
AnswerRe: how can i input from file using i/o with getline Pin
David Crow10-Apr-09 2:55
David Crow10-Apr-09 2:55 
QuestionDisplaying date in Short Format Pin
shiv@nand9-Apr-09 22:50
shiv@nand9-Apr-09 22:50 
AnswerRe: Displaying date in Short Format Pin
Jijo.Raj9-Apr-09 23:02
Jijo.Raj9-Apr-09 23:02 
AnswerRe: Displaying date in Short Format Pin
shiv@nand9-Apr-09 23:16
shiv@nand9-Apr-09 23:16 
GeneralRe: Displaying date in Short Format Pin
Jijo.Raj10-Apr-09 0:57
Jijo.Raj10-Apr-09 0:57 
QuestionRe: Displaying date in Short Format Pin
David Crow10-Apr-09 2:57
David Crow10-Apr-09 2:57 
Questiondoubly linked lsit Pin
Aljaz1119-Apr-09 22:34
Aljaz1119-Apr-09 22:34 
how to put node at the end of list. I have so:
struct element{<br />
	int key;<br />
	int idx;<br />
	element *prev, *next;<br />
};


in main i have:

<br />
element* head=NULL; ->pointer on begging<br />
element* tail=NULL; ->pointer on end<br />
element* new=NULL; ->pointer for new node<br />
<br />
int el;<br />
new=new element;<br />
                <br />
cin>>el;<br />
nov_el->key=el;<br />
add(head,new,tail); <br />


I know how to put node at the beggining:
<br />
void vstavi(element*&head, element* new, element*&tail)<br />
{<br />
new->prev=NULL;<br />
new->next=head;<br />
<br />
if(head!=NULL)<br />
{<br />
    head->prev=new;<br />
}<br />
<br />
else<br />
tail=new;<br />
head=new;<br />
<br />
}<br />


How to change this code for adding on beggining so it will add on the end. And everytime new node is added to the end idx from structure element must idx=idx+1;

Thanks a lot
AnswerRe: doubly linked lsit Pin
CPallini9-Apr-09 23:22
mveCPallini9-Apr-09 23:22 
GeneralRe: doubly linked lsit Pin
Aljaz11110-Apr-09 2:14
Aljaz11110-Apr-09 2:14 
AnswerRe: doubly linked lsit Pin
Divyang Mithaiwala9-Apr-09 23:23
Divyang Mithaiwala9-Apr-09 23:23 
GeneralRe: doubly linked lsit Pin
CPallini9-Apr-09 23:29
mveCPallini9-Apr-09 23:29 
QuestionCannot convert from 'CString' to 'TCHAR []' Pin
PankajB9-Apr-09 22:31
PankajB9-Apr-09 22:31 
AnswerRe: Cannot convert from 'CString' to 'TCHAR []' Pin
PankajB9-Apr-09 23:01
PankajB9-Apr-09 23:01 
GeneralRe: Cannot convert from 'CString' to 'TCHAR []' Pin
CPallini9-Apr-09 23:25
mveCPallini9-Apr-09 23:25 
AnswerRe: Cannot convert from 'CString' to 'TCHAR []' Pin
CPallini9-Apr-09 23:13
mveCPallini9-Apr-09 23:13 
Questionpointer on class Pin
durban29-Apr-09 21:43
durban29-Apr-09 21:43 
QuestionRe: pointer on class Pin
CPallini9-Apr-09 22:28
mveCPallini9-Apr-09 22:28 
QuestionCompare recorded speech (with FFT?) Pin
rwilmink9-Apr-09 21:16
rwilmink9-Apr-09 21:16 
QuestionExternal Hard Disk Drives Pin
Abinash Mohanty9-Apr-09 21:00
Abinash Mohanty9-Apr-09 21:00 
AnswerRe: External Hard Disk Drives Pin
Hamid_RT9-Apr-09 21:07
Hamid_RT9-Apr-09 21:07 
GeneralRe: External Hard Disk Drives Pin
Abinash Mohanty9-Apr-09 23:28
Abinash Mohanty9-Apr-09 23:28 
QuestionRe: External Hard Disk Drives Pin
David Crow10-Apr-09 3:02
David Crow10-Apr-09 3:02 
QuestionMacro, why? Pin
Maxwell Chen9-Apr-09 20:16
Maxwell Chen9-Apr-09 20:16 
QuestionRe: Macro, why? Pin
CPallini9-Apr-09 20:29
mveCPallini9-Apr-09 20:29 

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.