Click here to Skip to main content
15,867,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCan we capture HD video using DirectShow C++/MFC .? Pin
mbatra3117-Dec-12 23:30
mbatra3117-Dec-12 23:30 
AnswerRe: Can we capture HD video using DirectShow C++/MFC .? Pin
Kimcopeland1-Apr-21 18:32
Kimcopeland1-Apr-21 18:32 
AnswerRe: Can we capture HD video using DirectShow C++/MFC .? Pin
Kimcopeland2-Apr-21 5:01
Kimcopeland2-Apr-21 5:01 
QuestionCWinApp::OnFileNew failed ? Pin
Codzer17-Dec-12 19:23
Codzer17-Dec-12 19:23 
GeneralRe: CWinApp::OnFileNew failed ? Pin
Jochen Arndt17-Dec-12 21:33
professionalJochen Arndt17-Dec-12 21:33 
GeneralRe: CWinApp::OnFileNew failed ? Pin
Codzer18-Dec-12 2:48
Codzer18-Dec-12 2:48 
AnswerRe: CWinApp::OnFileNew failed ? Pin
Jochen Arndt18-Dec-12 3:03
professionalJochen Arndt18-Dec-12 3:03 
QuestionLinked List Via Disk File Pin
imboared117-Dec-12 19:01
imboared117-Dec-12 19: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


C++
#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 22:15
mveRichard MacCutchan17-Dec-12 22:15 
QuestionConfused with destructor Pin
Super Lloyd17-Dec-12 2:33
Super Lloyd17-Dec-12 2:33 
AnswerRe: Confused with destructor Pin
Erudite_Eric17-Dec-12 4:54
Erudite_Eric17-Dec-12 4:54 
GeneralRe: Confused with destructor Pin
Super Lloyd17-Dec-12 5:01
Super Lloyd17-Dec-12 5:01 
GeneralRe: Confused with destructor Pin
jschell17-Dec-12 8:31
jschell17-Dec-12 8:31 
GeneralRe: Confused with destructor Pin
Super Lloyd17-Dec-12 16:59
Super Lloyd17-Dec-12 16:59 
GeneralRe: Confused with destructor Pin
megaadam18-Dec-12 3:51
professionalmegaadam18-Dec-12 3:51 
GeneralRe: Confused with destructor Pin
Stefan_Lang19-Dec-12 5:33
Stefan_Lang19-Dec-12 5:33 
GeneralRe: Confused with destructor Pin
Super Lloyd19-Dec-12 11:35
Super Lloyd19-Dec-12 11:35 
GeneralRe: Confused with destructor Pin
Erudite_Eric20-Dec-12 23:20
Erudite_Eric20-Dec-12 23:20 
AnswerRe: Confused with destructor Pin
Stephen Hewitt17-Dec-12 17:10
Stephen Hewitt17-Dec-12 17:10 
GeneralRe: Confused with destructor Pin
Super Lloyd17-Dec-12 21:41
Super Lloyd17-Dec-12 21:41 
Questionfuzzy logic code Pin
robot2916-Dec-12 3:10
robot2916-Dec-12 3:10 
AnswerRe: fuzzy logic code Pin
Richard MacCutchan16-Dec-12 4:25
mveRichard MacCutchan16-Dec-12 4:25 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 4:01
robot2920-Dec-12 4:01 
GeneralRe: fuzzy logic code Pin
Richard MacCutchan20-Dec-12 4:16
mveRichard MacCutchan20-Dec-12 4:16 
GeneralRe: fuzzy logic code Pin
robot2920-Dec-12 5:26
robot2920-Dec-12 5:26 

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.