Skip to main content
GameDev.net gamedev.net
🔒 Locked

A Non-Return-Zero

Started by kingoftheday Apr 11, 2001 at 8:50 PM 5 replies 1k views
Original Post
kingoftheday
kingoftheday
Please help me to fix this program. What I am trying to achieve are: a) NRZL (Non-Return-Zero) b) NRZI (Non-Return-Zero) c) RZ (Return-Zero) d) Manchester e) Differential Manchest I wish I can use graphic function on C++ to achieve this, but I don''t know how to use it. I will appreciate it, if you can use graphic to achieve my aim. Thank you very much. This is urgent. Below is my code. #include #include #include #include #define ARRAYSIZE 12 void NRZL(void); void NRZI(void); void RZ(void); void Manchester(void); void DifferentialManchest (void); int x, n, R[ARRAYSIZE]={0}; int main() { cout << "Enter 10 binary digit number \n"; for(n = 0; n <= ARRAYSIZE-1; n++) cin >> R[n]; clrscr(); cout << endl; for(n = 0; n <= ARRAYSIZE-1; n++) cout <<'' ''<< R[n] <<'' ''<< '' ''; NRZL(); cin >> x; } void NRZL(void) { int x; cout << "\n NRZ-L" << endl; for(n = 0; n <= ARRAYSIZE-1; n++){ cout << '' ''; if (R[0] ==0) cout << "----"; else cout << "____"; for(n = 0; n <= ARRAYSIZE-1; n++){ if((R[n]==0) && (R[n-1]==0)) cout << "----"; if((R[n]==0) && (R[n-1]==1)) cout << "|---"; if ( (R[n] ==1) && (R[n-1] ==0)) cout << "|----"; if ( (R[n] ==1) && (R[n-1] ==1)) cout <<"____"; } } NRZI (); cin >> x; } void NZRI(void) { cout << endl; cout << "\n NRZ-I" << endl; for(n = 0; n <= ARRAYSIZE-1; n++) { cout << '' ''; for(n = 0; n <= ARRAYSIZE-1; n++) { if(R[n] == 1) cout << "|---"; else cout << "----"; } } cout << endl; RZ (); } void RZ(void) { cout << endl; cout << "\n RZ" <> x; }
Cyberdrek
Cyberdrek
quote:
Original post by kingoftheday

Please help me to fix this program. What I am trying to achieve are:
a) NRZL (Non-Return-Zero)
b) NRZI (Non-Return-Zero)
c) RZ (Return-Zero)
d) Manchester
e) Differential Manchest

I wish I can use graphic function on C++ to achieve this, but I don''t know how to use it. I will appreciate it, if you can use graphic to achieve my aim. Thank you very much. This is urgent.




First of all, when asking for help something, try doing it yourself. If you don''t know how, try to figure it out by looking it up on the web or in a book. Second of all, describe what the program is supposed to do and third, tell us what the problem is. Fourth, if it''s a school project, you can always ask a teacher IF we can''t help.






"And that''s the bottom line cause I said so!"

Cyberdrek
Headhunter Soft
A division of DLC Multimedia

Resist Windows XP''s Invasive Product Activation Technology!
[Cyberdrek | ]
kingoftheday
kingoftheday
Thank you for your response. I wrote the code by my self already. I am not asking anybody to write the code for me. What I want is help me to fix it. Actually the program is working fine but, I want to use Graphic functions, rather than "___" that I use in the program. Thanks
kingoftheday
kingoftheday
Steve ''Sly'' Williams, Thank you very much. I sent you email to explain it in detail with diagram. Your quick response will be highly appreciated
Philth
Philth
You didn't mention what compiler you're using or what version. You mentioned C++ .. But is it Borland C++ Builder? If it is, why can't you just make a form and then use images and place them all over? I will assume you're using some sort of DOS based C++ compiler. From what I can tell you enter a 10 digit number, then your program spits out different text based graphics depending on each digit. I don't know much about C++ .. I'm a Delphi man..

Simple searches on Google came up with this DOS based library which is shareware, but not crippleware, and it looks fairly straightforward.

VSA256
http://ourworld.compuserve.com/homepages/blueberry/vsa256.htm
or

SVGACC 2.6
http://www.zephyrsoftware.com/products/zcc.html

These might point you somewhere.. If not, maybe someone else with better understanding can help.



Edited by - Philth on April 16, 2001 10:28:14 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.