<?xml version="1.0" encoding="iso-8859-1" ?>
<rss version="0.92">
<channel>
	<docs>http://backend.userland.com/rss092</docs>
	<title>C++ - Risorse gratuite</title>
	<link>http://cpiupiu.altervista.org/forum/</link>
	<description>xx</description>
	<managingEditor>cpiupiu@altervista.org</managingEditor>
	<webMaster>cpiupiu@altervista.org</webMaster>
	<lastBuildDate>Thu, 26 Nov 2009 03:39:41 GMT</lastBuildDate>
<item>
	<title>Chi mi dice la differenza???</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13140#13140</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1896&quot; target=&quot;_blank&quot;&gt;alex&lt;/a&gt; |&lt;br /&gt;
Risposte: 1 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Ho due funzioni scambia con passaggi diversi:
&lt;br /&gt;
  1)
&lt;br /&gt;
   void scambia(int &amp;amp;x,int &amp;amp;y){ //per riferimento
&lt;br /&gt;
    int z=x; x=y; y=z;
&lt;br /&gt;
   }
&lt;br /&gt;
    //main
&lt;br /&gt;
   void main(){
&lt;br /&gt;
    int a=1,b=2;
&lt;br /&gt;
    scambia(a,b);
&lt;br /&gt;
    printf(%d ,%d&quot;,a,b);
&lt;br /&gt;
   }
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
  2)void scambia( int *x,int *y){//passaggio per indirizzo
&lt;br /&gt;
      int *z=x; *x=z; *y=z;
&lt;br /&gt;
     }
&lt;br /&gt;

&lt;br /&gt;
   void main(){
&lt;br /&gt;
    int a=1,b=2;
&lt;br /&gt;
    scambia(&amp;amp;a,&amp;amp;b);
&lt;br /&gt;
    printf(&quot;%d,%d&quot;,a,b);
&lt;br /&gt;
   }
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
Quali sono le due differenze nella modalita dei passaggi dei parametri?
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>torre di hanoi iterativo</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13138#13138</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=966&quot; target=&quot;_blank&quot;&gt;arielmoreira&lt;/a&gt; |&lt;br /&gt;
Risposte: 0 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Questa é la versione della torre di hanoi iterativa e molto piu semplice di quella che avevo postato qui al forum!
&lt;br /&gt;
&lt;/span&gt;&lt;table cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;  &lt;tr&gt;     &lt;td height=&quot;20&quot;&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Codice:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;right&quot; class=&quot;genmed&quot;&gt;&lt;a name=&quot;cq&quot; href=&quot;#&quot; onClick=&quot;top.codeResizer(this);return false;&quot;&gt;Espandi/Riduci&lt;/a&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td colspan=&quot;2&quot; class=&quot;code&quot;&gt;      &lt;div style=&quot;width:546px; height:66px; overflow:auto; white-space:nowrap;&quot;&gt;	  
&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;
&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;
&lt;br /&gt;
/**
&lt;br /&gt;
* author Fábio
&lt;br /&gt;
&amp;nbsp; email &lt;a href=&quot;mailto:fabone.moreira@gmail.com&quot;&gt;fabone.moreira@gmail.com&lt;/a&gt;
&lt;br /&gt;
*/
&lt;br /&gt;
int main&amp;#40;int argc, char *argv&amp;#91;&amp;#93;&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int qtDiscos=2;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int tamanhoMax=&amp;#40;int&amp;#41; pow&amp;#40;2, qtDiscos&amp;#41; - 1;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int sequenciaPares&amp;#91;3&amp;#93;;//para pares
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int indexPar=0;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int indexImpar=0;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int sequenciaImpares&amp;#91;3&amp;#93;;//para impares
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;int i=0;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;qtDiscos % 2 == 0&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaPares&amp;#91;0&amp;#93;=12;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaPares&amp;#91;1&amp;#93;=23;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaPares&amp;#91;2&amp;#93;=31;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ////////////////////////
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaImpares&amp;#91;0&amp;#93;=13;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaImpares&amp;#91;1&amp;#93;=12;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaImpares&amp;#91;2&amp;#93;=32;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;else&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaPares&amp;#91;0&amp;#93;=13;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaPares&amp;#91;1&amp;#93;=32;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaPares&amp;#91;2&amp;#93;=21;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ////////////////////////
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaImpares&amp;#91;0&amp;#93;=12;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaImpares&amp;#91;1&amp;#93;=13;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sequenciaImpares&amp;#91;2&amp;#93;=23;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for &amp;#40;i = 0; i &amp;lt; tamanhoMax; i++&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;i % 2 == 0&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;indexPar &amp;gt; 2&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; indexPar = 0;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf&amp;#40;&amp;quot; %d ---&amp;gt; %d \n&amp;quot;,sequenciaPares&amp;#91;indexPar&amp;#93;/10,sequenciaPares&amp;#91;indexPar&amp;#93;%10&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; indexPar++;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125; else &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if &amp;#40;indexImpar &amp;gt; 2&amp;#41; &amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; indexImpar = 0;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf&amp;#40;&amp;quot; %d ---&amp;gt; %d \n&amp;quot;,sequenciaImpares&amp;#91;indexImpar&amp;#93;/10,sequenciaImpares&amp;#91;indexImpar&amp;#93;%10&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; indexImpar++;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#125;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; system&amp;#40;&amp;quot;PAUSE&amp;quot;&amp;#41;;&amp;nbsp; &amp;nbsp;
&lt;br /&gt;
&amp;nbsp; return 0;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;
      &lt;/div&gt;     &lt;/td&gt;  &lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>problema con libreria crypto++</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13136#13136</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1899&quot; target=&quot;_blank&quot;&gt;flo&lt;/a&gt; |&lt;br /&gt;
Risposte: 0 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Ciao a tutti,
&lt;br /&gt;
sto compilando la libreria Crypto++ in ambiente linux(distribuzione slackware 12.2) con kdevelop ma mi da il seguente errore e non so cosa significa:
&lt;br /&gt;

&lt;br /&gt;
&quot;error:exception handling disabled, use -fexceptions to enable&quot;
&lt;br /&gt;

&lt;br /&gt;
per favore qualcuno mi aiutiiiiiiiii &lt;img src=&quot;http://cpiupiu.altervista.org/forum/images/smiles/icon_eek.gif&quot; alt=&quot;Shocked&quot; border=&quot;0&quot; /&gt;  &lt;img src=&quot;http://cpiupiu.altervista.org/forum/images/smiles/icon_question.gif&quot; alt=&quot;Question&quot; border=&quot;0&quot; /&gt;
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>C++ page ranking : aprire html e memorizzare gli &amp;lt;a rhef=</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13133#13133</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1878&quot; target=&quot;_blank&quot;&gt;ragno7719&lt;/a&gt; |&lt;br /&gt;
Risposte: 0 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Salve, ho bisogno del vostro aiuto : sto scrivendo un programma in C++ e tra le varie cose devo poter aprire una pagina Html, leggerla riga per riga per poi poter ritrovare tutti i &amp;lt;a href= “indirizzo_web” &amp;gt; . Quello que mi serve in effetti, è “memorizzare” gli indirizzi web, per poterli riutilizzare in un secondo momento. Riesco ad aprire il file html e anche a leggerlo (usando ifstream e getline), ma non so come ritrovare e &quot;fermarmi&quot; su gli indirzzi web e “memorizzarli”, per esempio trascrivendoli su un nuovo file. So che con ofstream posso creare un nuovo file, ma non so cosa mettere dentro, cioè non so come fare a “trattenere” solo quei caratteri che mi servono e che compongono la frase indirizzo_web. Grazie per il vostro aiuto
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Problema con scrittura su file</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13132#13132</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1895&quot; target=&quot;_blank&quot;&gt;lumezius&lt;/a&gt; |&lt;br /&gt;
Risposte: 0 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Salve a tutti mi sono appena iscritto al forum, vorrei chiedere un aiuto a qualcuno che mastica C++ meglio di me. Descrivo il problema, ho scritto un programma che scrive una chiave di registro per avviarsi automaticamente al Boot (Don't worry nn è un virus), riporto le linee di codice della funzione che imposta la chiave:
&lt;br /&gt;

&lt;br /&gt;
void RunRegistry()
&lt;br /&gt;
{
&lt;br /&gt;
//Dichiariamo una variabile per la directory corrente
&lt;br /&gt;
TCHAR szModule [MAX_PATH];
&lt;br /&gt;

&lt;br /&gt;
//Valuta il posizionamento attuale
&lt;br /&gt;
GetModuleFileName(0,szModule,MAX_PATH);
&lt;br /&gt;

&lt;br /&gt;
char buffer[512];
&lt;br /&gt;
HKEY software;
&lt;br /&gt;

&lt;br /&gt;
//Mette in &quot;buffer&quot; il percorso
&lt;br /&gt;
strcpy(buffer,szModule);
&lt;br /&gt;

&lt;br /&gt;
//memorizza la grandezza della variabile unsigned.
&lt;br /&gt;
unsigned long size = strlen(buffer);
&lt;br /&gt;

&lt;br /&gt;
//apre ad esempio la chiave &quot;run&quot;
&lt;br /&gt;
RegCreateKey(HKEY_LOCAL_MACHINE,&quot;Software\\Microso ft\\Windows\\CurrentVersion\\run&quot;,&amp;amp;software);
&lt;br /&gt;

&lt;br /&gt;
//inserisce il percorso 
&lt;br /&gt;
RegSetValueEx(software,&quot;WINLOGS&quot;,NULL,REG_SZ,(LPBY TE)buffer,size);
&lt;br /&gt;

&lt;br /&gt;
//chiude
&lt;br /&gt;
RegCloseKey(software);
&lt;br /&gt;

&lt;br /&gt;
}
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
questa funzione FUNZIONA (scusate il gioco di parole) egregiamente. il problema sta nel fatto che, il programma scrive un semplice file txt, se lancio il programma io (per capirci ci faccio doppio clik ) il file viene scritto, se riavvio il sistema e faccio in modo che sia il sistema operativo a caricare il programma il file nn viene scritto più O_O. Qualcuno mi sa dare una mano?! Lascio sotto il codice della funzione che scrive il file:
&lt;br /&gt;

&lt;br /&gt;
FILE *logfile = fopen(LOG_FILE, &quot;a&quot;);
&lt;br /&gt;

&lt;br /&gt;
if(logfile != NULL) // se si ha accesso al file scrive, altrimenti lascia perdere l'operazione
&lt;br /&gt;
{
&lt;br /&gt;
fprintf(logfile, &quot;%s&quot;, temp); // aggiunge al file il contenuto della stringa temp
&lt;br /&gt;
fclose(logfile);
&lt;br /&gt;
}
&lt;br /&gt;

&lt;br /&gt;
Spero che qualcuno possa aiutarmi Grazie!!!
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>problema stupido</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13124#13124</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1894&quot; target=&quot;_blank&quot;&gt;paco&lt;/a&gt; |&lt;br /&gt;
Risposte: 7 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;ciao a tutti sono alle primissime armi in c++ ho sempre programmato in java
&lt;br /&gt;
come posso gestire un input nel modo ./nomefile stringadaleggere?
&lt;br /&gt;
io ho sempre fatto cosi: eseguo il file, poi printf e scanf, invece qui mi dice di leggere direttamente all'esecuzione del file
&lt;br /&gt;

&lt;br /&gt;
grazie
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Amici</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13123#13123</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1716&quot; target=&quot;_blank&quot;&gt;Ntony&lt;/a&gt; |&lt;br /&gt;
Risposte: 0 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Ciao ragazzi
&lt;br /&gt;
devo realizzare un programma c++ che riceve un file con coppie di nomi tipo:
&lt;br /&gt;

&lt;br /&gt;
AAAAAA   BBBBBB
&lt;br /&gt;
AAAAAA  CCCCCCC
&lt;br /&gt;
BBBBBB  FFFFFFFFF
&lt;br /&gt;

&lt;br /&gt;
Dove A è amico di B e viceversa e lo stesso per le altre coppie.
&lt;br /&gt;

&lt;br /&gt;
Sempre nel file ho un intero X.
&lt;br /&gt;

&lt;br /&gt;
Il mio programma deve restituire i gruppi formati da X persone che hanno più amici in comune.
&lt;br /&gt;

&lt;br /&gt;
Qualcuno ha qualche suggerimento?
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Estrazione componenti rgb</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13120#13120</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1890&quot; target=&quot;_blank&quot;&gt;Armaneddon&lt;/a&gt; |&lt;br /&gt;
Risposte: 0 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;&lt;/span&gt;&lt;table cellspacing=&quot;1&quot; cellpadding=&quot;1&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;  &lt;tr&gt;     &lt;td height=&quot;20&quot;&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Codice:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;    &lt;td align=&quot;right&quot; class=&quot;genmed&quot;&gt;&lt;a name=&quot;cq&quot; href=&quot;#&quot; onClick=&quot;top.codeResizer(this);return false;&quot;&gt;Espandi/Riduci&lt;/a&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr&gt;    &lt;td colspan=&quot;2&quot; class=&quot;code&quot;&gt;      &lt;div style=&quot;width:546px; height:66px; overflow:auto; white-space:nowrap;&quot;&gt;	  #include&amp;lt;stdio.h&amp;gt;
&lt;br /&gt;
#include&amp;lt;malloc.h&amp;gt;
&lt;br /&gt;

&lt;br /&gt;
int rows=512,cols=512;
&lt;br /&gt;
unsigned char **img1,**imgR,**imgG,**imgB;
&lt;br /&gt;

&lt;br /&gt;
unsigned char** allocabuffer&amp;#40;int r, int c&amp;#41;;
&lt;br /&gt;
void eliminabuffer&amp;#40;unsigned char **buffer,int r&amp;#41;;
&lt;br /&gt;
void readraw&amp;#40;char *filepath,unsigned char **buffer&amp;#41;;
&lt;br /&gt;
void readrawR&amp;#40;char *filepath,unsigned char **buffer&amp;#41;;
&lt;br /&gt;
void readrawG&amp;#40;char *filepath,unsigned char **buffer&amp;#41;;
&lt;br /&gt;
void readrawB&amp;#40;char *filepath,unsigned char **buffer&amp;#41;;
&lt;br /&gt;
void saveraw&amp;#40;char *filepath,unsigned char **buffer&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
FILE *out;
&lt;br /&gt;

&lt;br /&gt;
main&amp;#40;&amp;#41; 
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; imgR=allocabuffer&amp;#40;rows, cols&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; readrawR&amp;#40;&amp;quot;C&amp;#58;\\Documents and Settings\\Paolo L\\Desktop\\EIV\\img.raw&amp;quot;,imgR&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; saveraw&amp;#40;&amp;quot;C&amp;#58;\\Documents and Settings\\Paolo L\\Desktop\\EIV\\img_R.raw&amp;quot;,imgR&amp;#41;;
&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;

&lt;br /&gt;
&amp;nbsp; &amp;nbsp; eliminabuffer&amp;#40;imgR,rows&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
unsigned char** allocabuffer&amp;#40;int r, int c&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;unsigned char **buffer=&amp;#40;unsigned char**&amp;#41;malloc&amp;#40;r*sizeof&amp;#40;unsigned char*&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for&amp;#40;i=0;i&amp;lt;r;i++&amp;#41;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;buffer&amp;#91;i&amp;#93;=&amp;#40;unsigned char*&amp;#41;calloc&amp;#40;3*c,sizeof&amp;#40;unsigned char&amp;#41;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;return &amp;#40;buffer&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
// readraw RGB
&lt;br /&gt;
void readrawR&amp;#40;char *filepath,unsigned char **buffer&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;out=fopen&amp;#40;filepath,&amp;quot;rb&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for&amp;#40;i=0;i&amp;lt;rows*cols*3;i=i+3&amp;#41; fread&amp;#40;buffer&amp;#91;i&amp;#93;,1,1,out&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;fclose&amp;#40;out&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
void readrawG&amp;#40;char *filepath,unsigned char **buffer&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;FILE *source=fopen&amp;#40;filepath,&amp;quot;rb&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for&amp;#40;i=1;i&amp;lt;rows;i=i+3&amp;#41; fread&amp;#40;buffer&amp;#91;i&amp;#93;,1,cols,source&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;fclose&amp;#40;source&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
void readrawB&amp;#40;char *filepath,unsigned char **buffer&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;FILE *source=fopen&amp;#40;filepath,&amp;quot;rb&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for&amp;#40;i=2;i&amp;lt;rows;i=i+3&amp;#41; fread&amp;#40;buffer&amp;#91;i&amp;#93;,1,cols,source&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;fclose&amp;#40;source&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
void eliminabuffer&amp;#40;unsigned char **buffer,int r&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for&amp;#40;i=0;i&amp;lt;r;i++&amp;#41; free&amp;#40;buffer&amp;#91;i&amp;#93;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;free&amp;#40;buffer&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;

&lt;br /&gt;
void saveraw&amp;#40;char *filepath,unsigned char **buffer&amp;#41;
&lt;br /&gt;
&amp;#123;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;int i;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;FILE *source=fopen&amp;#40;filepath,&amp;quot;wb&amp;quot;&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;for&amp;#40;i=0;i&amp;lt;rows;i++&amp;#41; fwrite&amp;#40;buffer&amp;#91;i&amp;#93;,1,1,source&amp;#41;;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp;fclose&amp;#40;source&amp;#41;;
&lt;br /&gt;
&amp;#125;
&lt;br /&gt;
      &lt;/div&gt;     &lt;/td&gt;  &lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;
&lt;br /&gt;

&lt;br /&gt;
Salve, avrei bisogno di un aiuto, dovrei creare un codice c che mi permetta di estrarre da un immagine raw che ho sul computer (sequenza di pixel rgb rgb rgb...) le componenti r, g e b e di salvarle in 3 buffer diversi per poi estrarre la componente y... ho provato a implementare questo codice ma c'è qualcosa che non torna perchè non mi restituisce un immagine a livelli di grigio per le sole componenti r... cosa sto sbagliando?[/code]
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>funzioni</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13114#13114</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1090&quot; target=&quot;_blank&quot;&gt;francesca80&lt;/a&gt; |&lt;br /&gt;
Risposte: 2 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Ciao, ho bisogo di un consiglio. Devo fare un programma che prende in ingresso una funzione matematica (input da tastiera). é  presente qualche strumento che mi aiuti in questa operazione oppure devo farlo manualmente gestendo le proprietà degli operatori, delle parentesi,etc..?
&lt;br /&gt;
grazie per la risposta
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
<item>
	<title>Help per programma C++</title>
	<link>http://cpiupiu.altervista.org/forum/viewtopic.php?p=13112#13112</link>
	<description>Autore: &lt;a href=&quot;http://cpiupiu.altervista.org/forum/profile.php?mode=viewprofile&amp;u=1888&quot; target=&quot;_blank&quot;&gt;maris.p&lt;/a&gt; |&lt;br /&gt;
Risposte: 2 |&lt;br /&gt;Messaggio:
&lt;span class="postbody"&gt;Scrivere un programma C++ che acquisisce da tastiera un numero intero
&lt;br /&gt;
positivo n&amp;lt;=50 e successivamente n numeri interi positivi che suddivide in
&lt;br /&gt;
quattro insiemi A, B, C e D dove A è l'insieme dei numeri dispari, B è l'insieme
&lt;br /&gt;
dei multipli di 4, C è l'insieme dei multipli di 10 e D è l'insieme di tutti gli
&lt;br /&gt;
altri interi. Per finire, il programma deve scrivere separatamente sul video i
&lt;br /&gt;
quattro insiemi, dichiarando quale di essi sia, eventualmente, l'insieme vuoto.
&lt;/span&gt;&lt;br /&gt;
</description>
</item>
</channel>
</rss>

