Files with strings and ints won't print to screen!

This is a discussion on Files with strings and ints won't print to screen! within the C Programming forums, part of the General Programming Boards category; You have to ask the person to enter the file name, using the printf and scanf statement...and when entering the ...

  1. #16
    Registered User
    Join Date
    Nov 2011
    Posts
    16
    You have to ask the person to enter the file name, using the printf and scanf statement...and when entering the file name you have to be sure to type "filename.txt" also making sure that the text file is in the correct folder.

  2. #17
    Registered User
    Join Date
    Nov 2011
    Location
    IL
    Posts
    7
    Ah, my mistake. However, your scanf should be

    Code:
    scanf("%s", name);
    The name of an array is pointing to an address, so you wouldn't need the address of operator (&).
    Last edited by xxc0dephr34kxx; 11-26-2011 at 11:13 AM.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. converting ints to strings?
    By rodrigorules in forum C++ Programming
    Replies: 2
    Last Post: 11-25-2009, 03:49 AM
  2. Array of Ints to a Strings
    By mattAU in forum C Programming
    Replies: 10
    Last Post: 08-17-2006, 05:25 AM
  3. Strings into Ints
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 06-09-2002, 04:07 PM
  4. converting strings to ints
    By HomerJ in forum C++ Programming
    Replies: 3
    Last Post: 04-25-2002, 06:08 PM
  5. Converting strings to ints
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 04-25-2002, 02:48 PM

Tags for this Thread


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