Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 04-18-2003, 06:34 PM   #1 (permalink)
TheDreamless
Registered User
 
TheDreamless's Avatar
 
Join Date: Apr 2003
Posts: 10
TheDreamless is on a distinguished road
Send a message via AIM to TheDreamless
need more help! (thx)

(we use gcc)
Okay I have to use a function preorder() for my binary tree. It takes a function as an arguement Visit(). I have to use the function Visit to print out to a file.

1) when i try to call preorder from main() I get an error that visit is undeclared (first use in this function). But visit is a function.. how do i get it to pass the function?

2) how can i make an external variable with my filepointer output in such a way that i can go ahead and fprintf() to it?

Thanks in advance everybody.
TheDreamless is offline   Reply With Quote
Old 04-18-2003, 07:23 PM   #2 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
part one, i have no idea what you're talking about without seeing the code. but my guess is that you have not declared Visit() before your main function. try putting a function prototype near the top of your file (above main())

two, if i understand correctly what you mean is that you want to fprintf to a variable. you should look at sprintf()
joe_bruin is offline   Reply With Quote
Old 04-18-2003, 07:31 PM   #3 (permalink)
TheDreamless
Registered User
 
TheDreamless's Avatar
 
Join Date: Apr 2003
Posts: 10
TheDreamless is on a distinguished road
Send a message via AIM to TheDreamless
I have a prototype in my header file.. and I havent heard of sprintf() I will look it up.
TheDreamless is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Input from command line Kportertx Java 7 07-15-2003 06:34 AM
wine electricmaker12 Linux / BSD / OS X 2 06-08-2002 05:22 PM


All times are GMT -8. The time now is 11:22 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting