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
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ 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 ]


Post a message:
This forum requires an account to post.
[ Create Account ]
[ Login ]
[ Contact Forum Admin ]

"
"
Forum timezone: GMT-8
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 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