Click here to Skip to main content
11,477,834 members (72,937 online)

C / C++ / MFC

 
GeneralRe: How to make a project resolution independent.? Pin
Jochen Arndt19-Dec-12 3:06
memberJochen Arndt19-Dec-12 3:06 
AnswerRe: How to make a project resolution independent.? Pin
Alan Balkany19-Dec-12 5:25
memberAlan Balkany19-Dec-12 5:25 
QuestionASM with stams library of C ++ Pin
Gurunathkudalkar18-Dec-12 22:15
memberGurunathkudalkar18-Dec-12 22:15 
AnswerRe: ASM with stams library of C ++ Pin
CPallini18-Dec-12 23:19
mvpCPallini18-Dec-12 23:19 
Questionerror C2228 "must have class/struct/union" Pin
alaaan7318-Dec-12 5:55
memberalaaan7318-Dec-12 5:55 
AnswerRe: error C2228 "must have class/struct/union" Pin
Chris Losinger18-Dec-12 6:19
memberChris Losinger18-Dec-12 6:19 
AnswerRe: error C2228 "must have class/struct/union" Pin
Richard MacCutchan18-Dec-12 8:09
mvpRichard MacCutchan18-Dec-12 8:09 
AnswerRe: error C2228 "must have class/struct/union" Pin
Stefan_Lang21-Dec-12 2:59
memberStefan_Lang21-Dec-12 2:59 
QuestionCan we capture HD video using DirectShow C++/MFC .? Pin
mbatra3118-Dec-12 0:30
membermbatra3118-Dec-12 0:30 
QuestionCWinApp::OnFileNew failed ? Pin
Codzer17-Dec-12 20:23
memberCodzer17-Dec-12 20:23 
GeneralRe: CWinApp::OnFileNew failed ? Pin
Jochen Arndt17-Dec-12 22:33
memberJochen Arndt17-Dec-12 22:33 
GeneralRe: CWinApp::OnFileNew failed ? Pin
Codzer18-Dec-12 3:48
memberCodzer18-Dec-12 3:48 
AnswerRe: CWinApp::OnFileNew failed ? Pin
Jochen Arndt18-Dec-12 4:03
memberJochen Arndt18-Dec-12 4:03 
QuestionLinked List Via Disk File [modified] Pin
imboared117-Dec-12 20:01
memberimboared117-Dec-12 20:01 
ok so i am given the goal to read the disk file and separate each line into three fields of text, idnum, Name, absences and either store the data into three parallel arrays, or a linked list of objects the professor is going to give us a alternate file of student info. i was going to do a linked list but i am unsure of how to make it attached to a disk file. And how to implement it as we only spent one class on linked lists. I will admit i dont know much about linked lists. i know the basic formatting of them and ive read everything that my book covers but the information im seeking either im not comprehending or is unavailable in it. Being the goal of this project i figured a linked list would be the best course of route

all info and input is greatly appreciated here is what i have so far for the program as i said linked lists are not my strongest area

ramdom is the name of the text file btw


#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <cmath>
#include <cstring>
#include <cstdlib>
using namespace std;
 

int main()
{
{
	struct Student;
        int idnum;
        student *next;
}        
        int idnum[10000000];
	char name[10000000];
	double absence[100000000];
 
	ifstream infile("random.txt");
	int search_idnum;
	char random[50];
	ofstream out_stream;
	cin.getline(random, 50);
	out_stream.open(random);
	//test file
	if (infile.fail())
	
{
		cout << " unable to open the file" << endl;
		return 1; //error code
	}
	else
	//search file
	{
			cout << "Please enter the student id number: ";
			cin >> search_idnum;
			random >> idnum;
			
			if (int idnum == int search_num)
		{		random >> idnum >> name >> idnum;
	// output the row of the array
			cout << "For the idnum " << idnum << " the \n"
                 << "last name is: \n" << name << "and the "
                 << "absences is: \n" << absences;
			}
			else
		{		        {
            cout << "I could not find the student number.";
            system ("pause");
        }
	
	return 0;
 
}


here is the info

Quote:
4215534 Austin 3
5551298 Bailey 3
6224649 Balovich 4
6502286 Bates 4
8448936 Bettencourt 2
2883903 Blackburn 9
6752376 Boucher 1
3564698 Brown 2
6373150 Duncan 2
6375372 Estrada 1


modified 18-Dec-12 1:14am.

SuggestionRe: Linked List Via Disk File Pin
Richard MacCutchan17-Dec-12 23:15
mvpRichard MacCutchan17-Dec-12 23:15 
QuestionConfused with destructor Pin
Super Lloyd17-Dec-12 3:33
memberSuper Lloyd17-Dec-12 3:33 
AnswerRe: Confused with destructor Pin
Erudite_Eric17-Dec-12 5:54
memberErudite_Eric17-Dec-12 5:54 
GeneralRe: Confused with destructor Pin
Super Lloyd17-Dec-12 6:01
memberSuper Lloyd17-Dec-12 6:01 
GeneralRe: Confused with destructor Pin
jschell17-Dec-12 9:31
memberjschell17-Dec-12 9:31 
GeneralRe: Confused with destructor Pin
Super Lloyd17-Dec-12 17:59
memberSuper Lloyd17-Dec-12 17:59 
GeneralRe: Confused with destructor Pin
megaadam18-Dec-12 4:51
membermegaadam18-Dec-12 4:51 
GeneralRe: Confused with destructor Pin
Stefan_Lang19-Dec-12 6:33
memberStefan_Lang19-Dec-12 6:33 
GeneralRe: Confused with destructor Pin
Super Lloyd19-Dec-12 12:35
memberSuper Lloyd19-Dec-12 12:35 
GeneralRe: Confused with destructor Pin
Erudite_Eric21-Dec-12 0:20
memberErudite_Eric21-Dec-12 0:20 
AnswerRe: Confused with destructor Pin
Stephen Hewitt17-Dec-12 18:10
memberStephen Hewitt17-Dec-12 18:10 
GeneralRe: Confused with destructor Pin
Super Lloyd17-Dec-12 22:41
memberSuper Lloyd17-Dec-12 22:41 
Questionfuzzy logic code Pin
robot2916-Dec-12 4:10
memberrobot2916-Dec-12 4:10 
AnswerRe: fuzzy logic code Pin
Richard MacCutchan16-Dec-12 5:25
mvpRichard MacCutchan16-Dec-12 5:25 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 5:01
memberrobot2920-Dec-12 5:01 
GeneralRe: fuzzy logic code Pin
Richard MacCutchan20-Dec-12 5:16
mvpRichard MacCutchan20-Dec-12 5:16 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 6:26
memberrobot2920-Dec-12 6:26 
GeneralRe: fuzzy logic code Pin
Richard MacCutchan20-Dec-12 6:37
mvpRichard MacCutchan20-Dec-12 6:37 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 6:40
memberrobot2920-Dec-12 6:40 
GeneralRe: fuzzy logic code Pin
DavidCrow16-Dec-12 18:20
memberDavidCrow16-Dec-12 18:20 
AnswerRe: fuzzy logic code Pin
Joe Woodbury16-Dec-12 20:01
memberJoe Woodbury16-Dec-12 20:01 
AnswerRe: fuzzy logic code Pin
PecuniousPete16-Dec-12 21:51
memberPecuniousPete16-Dec-12 21:51 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 5:07
memberrobot2920-Dec-12 5:07 
AnswerRe: fuzzy logic code Pin
CPallini16-Dec-12 23:40
mvpCPallini16-Dec-12 23:40 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 5:10
memberrobot2920-Dec-12 5:10 
QuestionRe: fuzzy logic code Pin
CPallini20-Dec-12 7:25
mvpCPallini20-Dec-12 7:25 
AnswerRe: fuzzy logic code Pin
robot2920-Dec-12 7:47
memberrobot2920-Dec-12 7:47 
QuestionRe: fuzzy logic code Pin
CPallini20-Dec-12 9:27
mvpCPallini20-Dec-12 9:27 
AnswerRe: fuzzy logic code Pin
robot2920-Dec-12 10:17
memberrobot2920-Dec-12 10:17 
GeneralRe: fuzzy logic code Pin
CPallini20-Dec-12 11:12
mvpCPallini20-Dec-12 11:12 
GeneralRe: fuzzy logic code Pin
robot2921-Dec-12 2:19
memberrobot2921-Dec-12 2:19 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 5:11
memberrobot2920-Dec-12 5:11 
AnswerRe: fuzzy logic code [modified] Pin
April Fans19-Dec-12 17:43
memberApril Fans19-Dec-12 17:43 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 5:00
memberrobot2920-Dec-12 5:00 
QuestionHow do I select and pasted the mouse MFC loaded image. Pin
cemil.aksoyy15-Dec-12 13:26
membercemil.aksoyy15-Dec-12 13:26 
AnswerRe: How do I select and pasted the mouse MFC loaded image. Pin
Richard MacCutchan15-Dec-12 22:05
mvpRichard MacCutchan15-Dec-12 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 22 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid