Like Tree1Likes
  • 1 Post By jwroblewski44

Header files

This is a discussion on Header files within the C Programming forums, part of the General Programming Boards category; Modify program 3 by saving the header file on your memory stick and remove it from the Header section of ...

  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    31

    Header files

    Modify program 3 by saving the header file on your memory stick and remove it from the Header section of the VC++ in the Solutions window.

    Code:
     
    Code:
    /* Programmer : Himanshu Parmar
        PRG155F
    	DATE : March 27th 2013
    	LAB 9 : Defines,Macros And Header files */
    #include<stdio.h>
    #define pi 3.141592654
    #define A (num) * (pi) * (Radius)  /* a macro defines a math equation */
    float spherevolume (float);
    main()
    {
    	float a,c;
    	printf("Please enter the radius: ");
    	scanf("%f",&a);
    	c = spherevolume(a);
    	 printf("\n\nThe volume is : %.3f",c);
        getch();
    }
    float spherevolume (float b)
    {
    	
    	float num,Radius,d;
    	num = 1.333333333;
    	Radius = b * b * b;
    	d = A;
    	return(d);
    	getch();
    	
    }
    Can you help me Please?

  2. #2
    Registered User
    Join Date
    May 2009
    Posts
    2,507
    Attempt to do this assignment!
    Post your attempt.
    Put the code in three separate code blocks; one per file.
    Ask a question about your posted attempt.
    Post the Compiler/Linker errors or warnings.

    Tim S.
    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the Universe is winning." Rick Cook

  3. #3
    Registered User
    Join Date
    Mar 2013
    Posts
    10
    I Think It Is A MATHEMATICAL Function!!
    So Put Hetter File As #include<math.h>
    And try it

  4. #4
    young grasshopper jwroblewski44's Avatar
    Join Date
    May 2012
    Location
    Where the sidewalk ends
    Posts
    287
    I Think It Is A MATHEMATICAL Function!!
    So Put Hetter File As #include<math.h>
    And try it
    Nope.

    See stahta01's post for a great place to start.
    Salem likes this.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with Header Files and Source files
    By yukapuka in forum C Programming
    Replies: 3
    Last Post: 10-10-2012, 01:57 AM
  2. about #include files and header files
    By bulletbutter in forum C++ Programming
    Replies: 9
    Last Post: 04-18-2008, 10:24 AM
  3. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 10:46 AM
  4. Replies: 4
    Last Post: 12-14-2005, 01:21 PM
  5. include library header in header files
    By Raison in forum C++ Programming
    Replies: 6
    Last Post: 09-27-2004, 02:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21