Underground - Bhasker V K,the Sandman's Hideout

Thanks for dropping in...I got this running since i needed a place to post info that i found interesting which,i could access online .lotta stuff here might find a few glances ...so make ur self @ home...and hope u find the links/info ur looking for or atleast giv u a hint 'what you should ' be looking for .
Keep Clicking,
Bhasker V K
VoyForums

VoyUser Login optional ] [ Contact Forum Admin ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1 ]
Subject: Bhasker sep22.cpp


Author:
bhasker,ajay
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 03:07:55 09/22/05 Thu
Author Host/IP: NoHost/202.71.147.34

#include< stdio.h>
#include< stdlib.h>
#include< iostream.h>
#include< conio.h>
#include< fstream.h>
#include< string.h>

#define TotalProps 5
//#define TotalDecisions(x) (x+1)
void KnowledgeBase(int readORwrite);
int TSet[10][3];
int TotalDecisions;
//only five properties,temp,humidity,etc

//this program is meant for the user,no sequences will be entered.
struct property
{
char name[10];
int value;
};

struct decision //this is the
{
int decNo;
property prop[10];
char decResult[10];
};

void KnowledgeBase(int readORwrite) //0 for read,1 for write
{
int count=0;
int propcount;
//for now its hardcoded,need to add user interface here ,to enter values
if (readORwrite==0) //to read from knowledgebase
{
char ch;
cout<<"There are "< //cout<<"Enter"< //cout<<"Do you want to change this y/n";
cout<<"Enter how many decisions you will have";
cin>>TotalDecisions;


decision *dec=new decision[TotalDecisions];
//int *a=new int[TotalD]; WORKS!!!!!!
// TotalDecisions

for (count=0;count {
cout<<"**********READING DECISION"< dec[count].decNo=count;
char tempname[20];
char tempvalue;
cout< cin>>propcount;
for(int b=0;b<=propcount;b++)
{
cout<<"enter propertyname";
cin>>tempname;
cout<<"enter value for "< cin>>tempvalue;
strcpy(dec[count].prop[propcount].name,tempname);
dec[count].prop[propcount].value=tempvalue;
dec[count].decNo=propcount;
}
cout<<"What result will this have - ideal OR notideal ";
char tempResult[10];
cin>>tempResult;
strcpy(dec[count].decResult,tempResult);
}
}
else
if( readORwrite==1) //to write into knowledgebase
{
cout<<"There are "< decision *dec=new decision[TotalDecisions];
for (int a=0;a { cout<<"decisionID:"< for(int b=0;b<(dec[0].decNo);b++)
{
cout< }
cout<<"reult for decision"< }
}
}


void main()
{
clrscr();
cout<<"do you want to read or write into the knowledgebase \n 0 for reading,1 for writing";
int readORwrite;cin>>readORwrite;
KnowledgeBase(readORwrite); //0 for reading , 1 for writing.

//int b[2][2]={1,2}; //means that [0][0]=1 , and [0][1] = 2

//b[2][2]={2,2};
int i,j,k;
//for (j=0;j<2;j++){for (k=0;k<2;k++){cout<<"b["<

for(i=1;i {
//
//char TSet[10];
//char a[2][10]={"a","b"};
//TSet[0][3]={1,1,1};//itoa('1');
}

for(i=1;i {
//read user's properties

}
getch();
}

[ Next Thread | Previous Thread | Next Message | Previous Message ]


VoyUser Login ] Not required to post.
Post a public reply to this message | Go post a new public message
* Notice: Posting problems? [ Click here ]
* HTML allowed in marked fields.
Message subject (required):

Name (required):

  Expression (Optional mood/title along with your name) Examples: (happy, sad, The Joyful, etc.) help)

  E-mail address (optional):

* Type your message here:

Choose Message Icon: [ View Emoticons ]

Notice: Copies of your message may remain on this and other systems on internet. Please be respectful.

[ Contact Forum Admin ]

"
"
Forum timezone: GMT-8
VF Version: 2.94, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2008 Voyager Info-Systems. All Rights Reserved.
if u want to post ,send an email to bosky101@indiatimes.com ..this is to maintain the integrity of this forum ..cheers
Keep Clicking,
bosky101 Click here to listen to my music station