Click here to Skip to main content
16,010,544 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Simple Question Pin
jason9929-Apr-03 2:33
jason9929-Apr-03 2:33 
GeneralRe: Simple Question Pin
John R. Shaw29-Apr-03 15:55
John R. Shaw29-Apr-03 15:55 
GeneralRe: Simple Question Pin
SatyaDY30-Apr-03 0:48
SatyaDY30-Apr-03 0:48 
GeneralCreate a ENv variable-Help Pin
RaajaOfSelf28-Apr-03 20:29
RaajaOfSelf28-Apr-03 20:29 
GeneralRe: Create a ENv variable-Help Pin
Joaquín M López Muñoz28-Apr-03 20:52
Joaquín M López Muñoz28-Apr-03 20:52 
GeneralRe: Create a ENv variable-Help Pin
RaajaOfSelf28-Apr-03 21:01
RaajaOfSelf28-Apr-03 21:01 
GeneralRe: Create a ENv variable-Help Pin
basementman29-Apr-03 6:47
basementman29-Apr-03 6:47 
GeneralPrepend a letter to a char array using ASCII Pin
Brent Lamborn28-Apr-03 19:17
Brent Lamborn28-Apr-03 19:17 
This is the functin I'm working with:

//Load skills from skills.txt <br />
void CJobQueueSimulatorView::LoadSkills()<br />
{	<br />
<br />
	int numItems = m_skills.GetCount();<br />
<br />
	for(int k = 0; k < numItems; k++)<br />
	{<br />
		m_skills.DeleteString(0);<br />
	}<br />
<br />
	char next[25];<br />
<br />
	fstream fin(strCurrType + "_skills.txt", ios::in);<br />
	<br />
	if(!fin)<br />
	{<br />
		MessageBox("Could not open skills file!", "File Error",    MB_ICONEXCLAMATION);<br />
	}<br />
	else<br />
		while(fin >> next)<br />
			m_skills.AddString(next);<br />
<br />
	fin.close();<br />
}


What I would like to do is prepend a letter to each line I read from my text file. This would give me an I.D. that I can associate with each "skill". m_skills is a list box control variable. I don't want the letter code to be saved in the text file. I would like it to be assigned as the lines are taken from file and put into the list box. This would prevent users from assigning skills the same "I.D". Also, later when they add skills to the list, it would automatically assign an "I.D" I'm thinking the way to do it is with ASCII but I'm dumbConfused | :confused: and don't know how to do it. Anyone have a good idea of how to do it? (Sorry for the sloppy formnatting above. Things didn't copy over that well)

"It has become appallingly obvious that our technology has exceeded our humanity."
- Albert Einstein (1879-1955)

"I think there is a world market for maybe five computers."
- Thomas Watson (1874-1956), Chairman of IBM, 1943

"640K ought to be enough for anybody."
- Bill Gates (1955-), in 1981

"Half this game is ninety percent mental."
- Yogi Berra
GeneralRe: Prepend a letter to a char array using ASCII Pin
HJo29-Apr-03 0:35
HJo29-Apr-03 0:35 
GeneralRe: Prepend a letter to a char array using ASCII Pin
David Crow29-Apr-03 3:57
David Crow29-Apr-03 3:57 
Generalwinpcap giving the problem in sending packet Pin
summo28-Apr-03 19:10
summo28-Apr-03 19:10 
GeneralTo Open logfile in a notepad !!!!!!!!!!!!! Pin
summo28-Apr-03 18:48
summo28-Apr-03 18:48 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Hans Dietrich28-Apr-03 19:04
mentorHans Dietrich28-Apr-03 19:04 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Toni7828-Apr-03 19:23
Toni7828-Apr-03 19:23 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Anonymous28-Apr-03 20:58
Anonymous28-Apr-03 20:58 
GeneralRe: To Open logfile in a notepad !!!!!!!!!!!!! Pin
Toni7828-Apr-03 21:14
Toni7828-Apr-03 21:14 
Generaltwips to pixels Pin
Anonymous28-Apr-03 17:25
Anonymous28-Apr-03 17:25 
GeneralRe: twips to pixels Pin
Ernest Laurentin28-Apr-03 18:45
Ernest Laurentin28-Apr-03 18:45 
GeneralThank you Pin
Toni7828-Apr-03 19:37
Toni7828-Apr-03 19:37 
GeneralRe: twips to pixels Pin
Anonymous29-Apr-03 5:21
Anonymous29-Apr-03 5:21 
GeneralSearch a code MFC Pin
anaya28-Apr-03 16:59
anaya28-Apr-03 16:59 
GeneralRe: Search a code MFC Pin
David Crow29-Apr-03 3:54
David Crow29-Apr-03 3:54 
GeneralRe: Search a code MFC Pin
anaya29-Apr-03 14:38
anaya29-Apr-03 14:38 
GeneralRe: Search a code MFC Pin
David Crow30-Apr-03 2:42
David Crow30-Apr-03 2:42 
GeneralRe: Search a code MFC Pin
anaya30-Apr-03 6:06
anaya30-Apr-03 6:06 

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.