Search Results

Showing results 1 to 10 of 10
Search took 0.01 seconds.
Search: Posts Made By: stilllearning ; Forum: C and child forums
Forum: C Oct 14th, 2008
Replies: 10
Solved: printf
Views: 854
Posted By stilllearning
Here (http://www.planetoid.org/technical/samples/va_args/va_args.c) is an example of a printf using va_args.
Forum: C Oct 7th, 2008
Replies: 3
Solved: Guess Number
Views: 700
Posted By stilllearning
You should remove your scanf statements from the if {} and move them to under the while loop

Something like this will keep looping until you have the correct number. Or you could restrict the...
Forum: C Oct 6th, 2008
Replies: 8
Views: 1,098
Posted By stilllearning
Your variable "result" in not defined in the gcd() function. Also you need to return the result value.
Forum: C Oct 6th, 2008
Replies: 8
Views: 1,098
Posted By stilllearning
This


{
int result,a;
if a = 0 return b
while b ≠ 0
if a > b
a := a − b
else
Forum: C Oct 6th, 2008
Replies: 8
Views: 1,098
Posted By stilllearning
Well you are printing "result" without initializing it or assigning it a value. Is result supposed to be your GCD ? Then you probably want to move your print to after you have computed your GCD and...
Forum: C Sep 30th, 2008
Replies: 2
Views: 1,346
Posted By stilllearning
What you are doing will work i.e. RF_RXTXPAIR_SETTINGS code RF_SETTINGS[2];

If you want to dynamically assign an array size at runtime, you could do

RF_SETTINGS = malloc (number_of_elements *...
Forum: C Sep 25th, 2008
Replies: 10
Views: 1,932
Posted By stilllearning
paths is a pointer, as per your definition.

path_info *paths

When you do

global_routing_info[i].paths = (path_info *) malloc ( sizeof ( path_info ) );

You now have an array of paths.
Forum: C Sep 24th, 2008
Replies: 10
Views: 1,932
Posted By stilllearning
To access an element of the array "paths", you need to use the notation . not ->

so its
global_routing_info[neighbor].paths[no_paths].path_id = path;
Forum: C Sep 22nd, 2008
Replies: 6
Views: 606
Posted By stilllearning
Your tax rate for each year will be something like:

YearlyTaxRate = intial_cost * tax_rate;

Your current code states
tax_rate = ? * initial_cost;
total =...
Forum: C Dec 2nd, 2007
Replies: 11
Views: 2,524
Posted By stilllearning
The AIX native C compiler does not like the // comment style for .c files, since its considers it a C++ comment and not a C style comment. I think that is probably the reason you're getting the...
Showing results 1 to 10 of 10

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC