<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>'pointers on text file?' Thread RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the thread 'pointers on text file?' posted on the 'Beginner C/C++' forum at Programmer's Heaven.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Sat, 25 May 2013 10:53:08 -0700</pubDate>
    <lastBuildDate>Sat, 25 May 2013 10:53:08 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>pointers on text file?</title>
      <link>http://www.programmersheaven.com/mb/beginnercpp/430347/430347/pointers-on-text-file/</link>
      <description>Hi everybody.. &lt;br /&gt;
&lt;br /&gt;
I have a question about pointers and text files.. &lt;br /&gt;
&lt;br /&gt;
Well the case is so, that I have write a program for shcool, where I got a long list of soccer games as txt file. &lt;br /&gt;
I have to use that txt. to find out on which of the matches the teams have scoret most of the goals. &lt;br /&gt;
&lt;br /&gt;
Now the problem here is, I don't have a clue about, how I can use the data that is inside the txt.. &lt;br /&gt;
&lt;br /&gt;
This is what I have for now..&lt;br /&gt;
&lt;pre class="sourcecode"&gt;#include &amp;lt;stdio.h&amp;gt;
#include&amp;lt;string.h&amp;gt;
#define MAX_LEN 200

int main(void)
{
  FILE *inp;
  char name[MAX_LEN], name2[MAX_LEN];
  int score;
  long maal;

   inp =fopen("superliga.txt", "r");
   
    if (inp != NULL) {
	
	fscanf(inp, "%s ", name);

	 printf("%s ", name);
	 fclose(inp);
	}
	else {
	 printf("Cannot find the file");
	 }
	 
	 return 0;

}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
- Is there a way to use sscanf on the file?? &lt;br /&gt;
I want to be able to get some data from the txt file and be able to do some math and print it out again.. &lt;br /&gt;
Any idea is appreciated &lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/beginnercpp/430347/430347/pointers-on-text-file/</guid>
      <pubDate>Wed, 21 Nov 2012 14:33:22 -0700</pubDate>
      <category>Beginner C/C++</category>
    </item>
  </channel>
</rss>