rahul8590 71 Posting Whiz

how can i write a program to calculate the median of matrix in file1 , and send the output to file2 .....????
can anyone help me please??!
=======

sarah u gotto show some effort of your own .
Please give it a shot and later if you having problems u can post it in here , that would embolden people to help you .

1. U have a file with matrix data in it
2. u must have a function to retrive data from a file and store it in matrix format
3. Calculate the median using the formula , (i guess it shouldnt be a trouble finading the formula)
4.the result matrix u found , store it in another file

for simplicity purpose i would suggest you to first accept the matrix at run time , calculate the median and then print thr result , later on u can enhance it by introducing file reading ..

rahul8590 71 Posting Whiz

>If that isn't possible than I'll just forget it.
Well certainly thats possible .

well i dont know how your game is designed , but i faced an analogus problem in the past , where in the data was actually being printed , but i was also coming out of program immediate which made me unable to see the output.
so , i guess if you could ask the user to hit enter ( or any other character ) to exit the game or something similar , ur last output will still stay on the screen.

tiger86 commented: Very nice and helpful. +3
rahul8590 71 Posting Whiz

One of the utility is file parsing to detect correct file name aliases. For this roughly 200 functions need to be called

these functions which ur wanting to call are they incorporated in some header files or members of some classes .... details ?

it would be prudent http://www.catb.org/~esr/faqs/smart-questions.html
to read it

well it will be prudent to have those functions under one class . so to check the file aliases u can pass the filename to object and allow it to pass thru the rest of the functions .

rahul8590 71 Posting Whiz

What ur seeking for , is actually a whole different field of science called artificial intelligence .
Well ur imagination is possible but requires u to know a lot of concepts and knowledge on those specifics , hence its not a viable option if ur a newbie .

rahul8590 71 Posting Whiz

Its an integer array pal .
The right way to print is to put it inside a for/while loop .

for ( int i= 0;i <12 ; i++)
cout<< list[i];
LeoC++ commented: :-) thanks learnt something tonight!! +0
rahul8590 71 Posting Whiz

Well , i am not sure of a API whether i exist or not and even if there exist an API , the purpose will not completely be fulfilled .

For example :
Even if u write a program which doesnt allow to access internet after a time , the user can use other programs or tools to bypass it .

Although there is a way that can implement wat u asked and that is installing a proxy server in ur system .
i have myself done that in my college for regulating the internet access in each departments .
SQUID proxy server allows u to perform many functions like that.
Not only u can create a ACL (access control list ) but also assign user groups and set their time of access and other attributes.

rahul8590 71 Posting Whiz

1. People need not to have a single character as a password , ur code works only for a single character.

2. Goto is a very very bad & unstructured style of programming , double whammies like that are rare.

3.For , god sake stop using the old freaking turbo C++ compiler , there are much better compilers like gcc, boroland etc.

Salem commented: 3 EXCELLENT points! +18
jonsca commented: Yes-Please recycle anything else except for Borland code +1
rahul8590 71 Posting Whiz

i DO have searched the google to do multithreaded programming using c++ and found there were few like the ones supported in BOOST libraries and zthreads ..
I would be glad if u guys could help me in suggesting much better ways in doing so .

rahul8590 71 Posting Whiz

In ur turbo C there exist a include folder which contains many header files , ur supposed to place the desired header file in that directory.

PS: For god sake stop using turbo , u have much better compilers to work with.

Salem commented: Bad: Don't put 3rd party header files in the compiler include directory, Good!: Ditch TurboCrap +18
rahul8590 71 Posting Whiz

well in that case pal , could u enlighten ur more about the kind of enviornment ur working in and wat is your project all about ..?

rahul8590 71 Posting Whiz

dude i think you havent undestood me .......
i just need some simple fuction which will plot the graph for me when i inout the co ordinates, thats all . there is no complication in it.

i got a link and copied those libraries , but its giving me an error.

the underneath is the link from where i copied libraries
http://codecutter.org/tools/koolplot/

the error i got is something like this

graph.cpp||undefined reference to `Plotdata::Plotdata(double, double)'|
graph.cpp||undefined reference to `plot(Plotdata const&, Plotdata const&)'|
graph.cpp||undefined reference to `COLOR'|
graph.cpp||undefined reference to `COLOR'|
graph.cpp||undefined reference to `COLOR'|
graph.cpp||undefined reference to `COLOR'|
graph.cpp||undefined reference to `COLOR'|
graph.cpp||more undefined references to `COLOR' follow|
||=== Build finished: 8 errors, 0 warnings ===|
Salem commented: Thanks for the link, could be useful for others wanting to convert 'up' to the modern world. +30
rahul8590 71 Posting Whiz

well at the first place i would recommend usage of float data type instead on double , guess float would do the trick.
second of all subtract the left part of the no from the original no itself , by doin this u can isolate the decimal part and then if u r looking for a 3 decimal round off in all the nos ( which apparently is ) .
u can multiply the 3 digits decimal into 100 and then round of them

float round( float no )
{
     int x, temp;
     float y;
     temp = x = no ;   only the integer part is taken 
     y = no -  x ; u get the decimal number here 
     y*=100 ; decimal gets converted to 2 digit no n 1 decimal
     x = y;
     y-= x;  the last decimal is stored in y 
     if( y > = 0.5 )
             x++ ;
    return (temp + x/100) ;
}

well i would like you to dry run the code .

songweaver commented: very helpful +1