TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Mark Madronio
date: 1995-08-23 18:05:20
subject: C problem

Hi, I'm making a menu program for my TAFE assignment.  It's supposed to
be the front end of a doubly linked list database prog. I have this
highlighter function that highlights the selected text.  Here are some
bits of it.  We use Borland C++ 4.5.  I think it's the draw_main
function which has the error (but I can't remember now, I don't have
borland at home to test it on, and this class is only every Saturday). 
Anyway, the compiler says I'm missing a ")" on the line with the 
subfunction's name on it.  I'm pretty sure I'm not missing any ")".  I
think it's the use of "*" that makes the error but if I erase it, I get
lots more errors.  As you may notice, I am not an expert on pointers.
Please suggest a solution or even a replacement to my logic.  And please
include any relevant syntax since I don't have any online help to work
with.

	void highlighter(char);
	char main_text[8];
	void draw_main(char);


		draw_main(*main_text);
		highlighter(*main_text);

void draw_main(*main_text)
{
	main_text[1]="1. Enter a name\r\n";
	main_text[2]="2. Delete a name\r\n";
	main_text[3]="3. List the file\r\n";
	main_text[4]="4. Search\r\n";
	main_text[5]="5. Save the file\r\n";
	main_text[6]="6. Load the file\r\n";
	main_text[7]="7. Quit\n";
	cprintf("%s",main_text[1]);
	cprintf("%s",main_text[2]);
	cprintf("%s",main_text[3]);
	cprintf("%s",main_text[4]);
	cprintf("%s",main_text[5]);
	cprintf("%s",main_text[6]);
	cprintf("%s",main_text[7]);
}

void highlighter(*main_text)
{
	int selected;
	selected=1;
	textcolor(14);
	textbackground(4);
	gotoxy(1,selected);
	cprintf("%s",main_text[selected]);
}


Mark

... Tech Support is Just A Busy Signal Away
--- FMail 1.0g
* Origin: WASTELANDS BBS ADULT CARDS 2 LINES 7 CD'S (02)890-9248 (3:712/836)
SEEN-BY: 50/99 620/243 623/630 711/401 409 410 430 510 807 808 809 932 934
SEEN-BY: 712/218 401 404 407 505 506 515 517 618 619 623 704 813 814 816 830
SEEN-BY: 712/836 848 850 713/888 714/906 800/1 7877/2809
@PATH: 712/836 816 704 515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.