<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[gprof findet file nicht]]></title><description><![CDATA[<p>Hallo!<br />
Ich möchte gern quick_sort und shell_sort zeitlich analysieren.<br />
Ich arbeite unter Windows MinGW. cpp-File Name ist val.cpp<br />
Ich kompiliere mit<br />
g++ -pg val.cpp -o val</p>
<p>Und rufe die funktion auf<br />
val</p>
<p>Beim Aufruf von val zeigt er mir wie viel ints ich in datein habe.<br />
Aber beim Aufruf von<br />
gprof val</p>
<p>sagt er mir:<br />
val:No such file or directory</p>
<p>Wie muss ich denn gprof aufrufen?</p>
<p>Danke im Voraus.</p>
<p>Hier sind die codes:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

static void shell_sort(int a[], int size) {
	int i, j;
	int h = 1;

	do {
		h = h * 3 + 1;
	} while (h &lt;= size);

	do {
		h /= 3;
		for (i = h; i &lt; size; i++) {
			int v = a[i];
			for (j = i; j &gt;= h &amp;&amp; a[j - h] &gt; v; j -= h)
				a[j] = a[j - h];
			if (i != j)
				a[j] = v;
		}
	} while (h != 1);
}

static void quick_sort(int a[], int lo, int hi) {
	int h, l, p, t;

	if (lo &lt; hi) {
		l = lo;
		h = hi;
		p = a[hi];

		do {
			while ((l &lt; h) &amp;&amp; (a[l] &lt;= p))
				l = l + 1;
			while ((h &gt; l) &amp;&amp; (a[h] &gt;= p))
				h = h - 1;
			if (l &lt; h) {
				t = a[l];
				a[l] = a[h];
				a[h] = t;
			}
		} while (l &lt; h);

		t = a[l];
		a[l] = a[hi];
		a[hi] = t;

		quick_sort(a, lo, l - 1);
		quick_sort(a, l + 1, hi);
	}
}

int main() {
	int *a, *b;
	int i;

	a = new int[27];
	b = new int[27];

	ifstream fin;
	fin.open(&quot;C:/Users/Katjuwka/Desktop/C/rands.txt&quot;,ios::in);

	for (i = 0; i &lt; 27 &amp;&amp; !fin.eof(); i++) {
		fin &gt;&gt; a[i];
		b[i] = a[i];
	}
	cout &lt;&lt; i &lt;&lt; &quot; ints read&quot; &lt;&lt; endl;

	shell_sort(a, i);
	quick_sort(b, 0, i - 1);
	fin.close();

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/295015/gprof-findet-file-nicht</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 15:11:52 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/295015.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 05 Nov 2011 14:11:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 14:11:57 GMT]]></title><description><![CDATA[<p>Hallo!<br />
Ich möchte gern quick_sort und shell_sort zeitlich analysieren.<br />
Ich arbeite unter Windows MinGW. cpp-File Name ist val.cpp<br />
Ich kompiliere mit<br />
g++ -pg val.cpp -o val</p>
<p>Und rufe die funktion auf<br />
val</p>
<p>Beim Aufruf von val zeigt er mir wie viel ints ich in datein habe.<br />
Aber beim Aufruf von<br />
gprof val</p>
<p>sagt er mir:<br />
val:No such file or directory</p>
<p>Wie muss ich denn gprof aufrufen?</p>
<p>Danke im Voraus.</p>
<p>Hier sind die codes:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

static void shell_sort(int a[], int size) {
	int i, j;
	int h = 1;

	do {
		h = h * 3 + 1;
	} while (h &lt;= size);

	do {
		h /= 3;
		for (i = h; i &lt; size; i++) {
			int v = a[i];
			for (j = i; j &gt;= h &amp;&amp; a[j - h] &gt; v; j -= h)
				a[j] = a[j - h];
			if (i != j)
				a[j] = v;
		}
	} while (h != 1);
}

static void quick_sort(int a[], int lo, int hi) {
	int h, l, p, t;

	if (lo &lt; hi) {
		l = lo;
		h = hi;
		p = a[hi];

		do {
			while ((l &lt; h) &amp;&amp; (a[l] &lt;= p))
				l = l + 1;
			while ((h &gt; l) &amp;&amp; (a[h] &gt;= p))
				h = h - 1;
			if (l &lt; h) {
				t = a[l];
				a[l] = a[h];
				a[h] = t;
			}
		} while (l &lt; h);

		t = a[l];
		a[l] = a[hi];
		a[hi] = t;

		quick_sort(a, lo, l - 1);
		quick_sort(a, l + 1, hi);
	}
}

int main() {
	int *a, *b;
	int i;

	a = new int[27];
	b = new int[27];

	ifstream fin;
	fin.open(&quot;C:/Users/Katjuwka/Desktop/C/rands.txt&quot;,ios::in);

	for (i = 0; i &lt; 27 &amp;&amp; !fin.eof(); i++) {
		fin &gt;&gt; a[i];
		b[i] = a[i];
	}
	cout &lt;&lt; i &lt;&lt; &quot; ints read&quot; &lt;&lt; endl;

	shell_sort(a, i);
	quick_sort(b, 0, i - 1);
	fin.close();

}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2140706</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140706</guid><dc:creator><![CDATA[akvarel]]></dc:creator><pubDate>Sat, 05 Nov 2011 14:11:57 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 14:17:04 GMT]]></title><description><![CDATA[<p>Eigentlich genau so. Also wird val wohl nicht da sein, wo du denkst, wo es ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140707</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140707</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 05 Nov 2011 14:17:04 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 14:25:16 GMT]]></title><description><![CDATA[<blockquote>
<p>Also wird val wohl nicht da sein, wo du denkst, wo es ist.</p>
</blockquote>
<p>Ich verstehe nicht.<br />
gprof ist nicht in windows?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140713</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140713</guid><dc:creator><![CDATA[akvarel]]></dc:creator><pubDate>Sat, 05 Nov 2011 14:25:16 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 14:41:44 GMT]]></title><description><![CDATA[<p>Wenn da steht <code>val:No such file or directory</code> dann wird val nicht gefunden. Also wird's wohl nicht da sein, wo du sagst, dass es da wäre. Wenn du das nicht verstehst, dann ist das auch kein Wunder, denn dann bist du irgendwo, aber bestimmt nicht da, wo val ist.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140727</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 05 Nov 2011 14:41:44 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 14:48:22 GMT]]></title><description><![CDATA[<p>Wie konnte er denn<br />
g++ -pg val.cpp -o val</p>
<p>kompilieren lassen,ohne richtige file oder directory zu finden?</p>
<p>In Linux ist läuft es gut, aber unter Windows findet es das nicht.<br />
Wie kann ich dann val finden?<br />
Search? Es ergibt sich nur in val in genau da,wo es sein soll.<br />
Und ich habe auch in dieselbem directory gmon.out file</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140734</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140734</guid><dc:creator><![CDATA[akvarel]]></dc:creator><pubDate>Sat, 05 Nov 2011 14:48:22 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 14:52:45 GMT]]></title><description><![CDATA[<blockquote>
<p>Wie konnte er denn<br />
g++ -pg val.cpp -o val</p>
<p>kompilieren lassen,ohne richtige file oder directory zu finden?</p>
</blockquote>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Welches Verzeichnis sollte wer dafür brauchen?</p>
<blockquote>
<p>Es ergibt sich nur in val in genau da,wo es sein soll.<br />
Und ich habe auch in dieselbem directory gmon.out file</p>
</blockquote>
<p>Und du rufst auch von diesem Verzeichnis aus gprof auf? Falls ja, dann wäre dein gprof kaputt. Kann ich nicht glauben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140737</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140737</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 05 Nov 2011 14:52:45 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 15:08:00 GMT]]></title><description><![CDATA[<p>Ich konnte hier screen shoot nicht posten, also ich poste dass, was ich da eingebe</p>
<blockquote>
<p>path c:\MinGW\bin;%PATH%<br />
&gt; cd ...\Valgrid<br />
Valgrid&gt;dir</p>
</blockquote>
<p>gmon.out<br />
rands.txt<br />
val.cpp</p>
<p>Valgrid&gt;g++ -pg val.cpp -o val</p>
<p>Valgrid&gt;val<br />
27 ints read<br />
Valgrid&gt;dir</p>
<p>gmon.out<br />
rands.txt<br />
val.cpp val.exe</p>
<p>Valgrid&gt;gprof val<br />
val:No such file or directory</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140751</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140751</guid><dc:creator><![CDATA[akvarel]]></dc:creator><pubDate>Sat, 05 Nov 2011 15:08:00 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 15:55:47 GMT]]></title><description><![CDATA[<p>Die Datei heißt bei dir ja auch val.exe und nicht val.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140773</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sat, 05 Nov 2011 15:55:47 GMT</pubDate></item><item><title><![CDATA[Reply to gprof findet file nicht on Sat, 05 Nov 2011 16:17:30 GMT]]></title><description><![CDATA[<p>danke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2140786</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2140786</guid><dc:creator><![CDATA[akvarel]]></dc:creator><pubDate>Sat, 05 Nov 2011 16:17:30 GMT</pubDate></item></channel></rss>