Auteur |
Message |
Goulip
Gravitation, dégravitation
Inscrit le: 29 Déc 2006 Messages: 17437 Localisation: Phelma |
|
C/C++ |
|
le topic C/C++
_________________ 6A Phelma inside
quoi de la viande après le poisson?
bah non c'est pas un problème, il suffit de prévoir... en plus c'est délicieux !
par contre, les champignons et Phelma c'est signé Dédé... |
|
Mer Juin 27, 2007 9:04 pm |
|
|
Britman
Bouillie de pingouin aux sucs digestifs
Inscrit le: 29 Déc 2006 Messages: 5055 Localisation: ENSPG Grenoble |
|
|
|
C trop nul c topiC++
_________________ Et paf l'évier !
Phelma c'est bien... ou pas ?
Phelma |
|
Jeu Juin 28, 2007 1:27 pm |
|
|
g@FF
PingouinatOr - Terreur de la banquise
Inscrit le: 26 Jan 2007 Messages: 1146 Localisation: Derrière toi & accessoirement à Phelma |
|
|
|
#include <iostream>
using namespace std;
main()
{
cout << " VTFF TGFDP " << endl;
}
_________________ Le floodeur fou a encore frappé. D'ailleurs :
Phelma Phelma Phelma Phelma Phelma Phelma Phelma
Dernière édition par g@FF le Jeu Juin 28, 2007 2:06 pm; édité 1 fois |
|
Jeu Juin 28, 2007 1:39 pm |
|
|
Britman
Bouillie de pingouin aux sucs digestifs
Inscrit le: 29 Déc 2006 Messages: 5055 Localisation: ENSPG Grenoble |
|
|
|
#include iostream
#include fstream
using namespace std;
class gode{
string taille
}
main()
{
ofstream toncul;
gode BIG;
BIG.taille="enorme"
toncul << BIG << endl;
}
_________________ Et paf l'évier !
Phelma c'est bien... ou pas ?
Phelma |
|
Jeu Juin 28, 2007 1:41 pm |
|
|
Goulip
Gravitation, dégravitation
Inscrit le: 29 Déc 2006 Messages: 17437 Localisation: Phelma |
|
|
|
_________________ 6A Phelma inside
quoi de la viande après le poisson?
bah non c'est pas un problème, il suffit de prévoir... en plus c'est délicieux !
par contre, les champignons et Phelma c'est signé Dédé... |
|
Jeu Juin 28, 2007 1:41 pm |
|
|
Julien
Je te tuerai en dernier
Inscrit le: 29 Déc 2006 Messages: 16233 Localisation: Spartaaaa ! (Phelma) |
|
|
|
Bravo les gars, z'êtes les nouveaux winneurs.
_________________ Phelma
This is Phelma. Copy Phelma into your signature to help Jetlist' on his way to Google domination!
« les temps comme les oeufs sont durs et la bêtise n'a pas de limite. »
Jetlist = tas de cons |
|
Jeu Juin 28, 2007 1:50 pm |
|
|
g@FF
PingouinatOr - Terreur de la banquise
Inscrit le: 26 Jan 2007 Messages: 1146 Localisation: Derrière toi & accessoirement à Phelma |
|
|
|
Pas de bol Britman ! Ton code c'est de la merde ça compile pas !
3:10 #include expects "FILENAME" or <FILENAME>
4:10 #include expects "FILENAME" or <FILENAME>
8 error: 'string' does not name a type
12 error: new types may not be defined in a return type
12 error: 'main' must return 'int'
13 error: 'ofstream' undeclared
13 error: expected ';' before 'toncul'
15 error: 'class gode' has no member named 'taille'
16 error: expected ';' before 'toncul'
_________________ Le floodeur fou a encore frappé. D'ailleurs :
Phelma Phelma Phelma Phelma Phelma Phelma Phelma |
|
Jeu Juin 28, 2007 2:07 pm |
|
|
Julien
Je te tuerai en dernier
Inscrit le: 29 Déc 2006 Messages: 16233 Localisation: Spartaaaa ! (Phelma) |
|
|
|
Moi même je vous trouve ridicules. C'est grave. Mais rassurant quelque part.
_________________ Phelma
This is Phelma. Copy Phelma into your signature to help Jetlist' on his way to Google domination!
« les temps comme les oeufs sont durs et la bêtise n'a pas de limite. »
Jetlist = tas de cons |
|
Jeu Juin 28, 2007 2:10 pm |
|
|
g@FF
PingouinatOr - Terreur de la banquise
Inscrit le: 26 Jan 2007 Messages: 1146 Localisation: Derrière toi & accessoirement à Phelma |
|
|
Jeu Juin 28, 2007 2:22 pm |
|
|
Julien
Je te tuerai en dernier
Inscrit le: 29 Déc 2006 Messages: 16233 Localisation: Spartaaaa ! (Phelma) |
|
|
|
Attend, je vais ressortir mes vieux codes et vous ferez moins les malins, bande de tarlouzes. Jaloux de ça, pouah.
_________________ Phelma
This is Phelma. Copy Phelma into your signature to help Jetlist' on his way to Google domination!
« les temps comme les oeufs sont durs et la bêtise n'a pas de limite. »
Jetlist = tas de cons |
|
Jeu Juin 28, 2007 2:24 pm |
|
|
g@FF
PingouinatOr - Terreur de la banquise
Inscrit le: 26 Jan 2007 Messages: 1146 Localisation: Derrière toi & accessoirement à Phelma |
|
|
Jeu Juin 28, 2007 2:27 pm |
|
|
Julien
Je te tuerai en dernier
Inscrit le: 29 Déc 2006 Messages: 16233 Localisation: Spartaaaa ! (Phelma) |
|
|
|
Faut d'abord que je les retrouve. Bon, après-midi archéologie, au passage je trouverai p'tet des photos débiles pour le sujet correspondant en zone XXL, c'est parti.
_________________ Phelma
This is Phelma. Copy Phelma into your signature to help Jetlist' on his way to Google domination!
« les temps comme les oeufs sont durs et la bêtise n'a pas de limite. »
Jetlist = tas de cons |
|
Jeu Juin 28, 2007 2:31 pm |
|
|
Goulip
Gravitation, dégravitation
Inscrit le: 29 Déc 2006 Messages: 17437 Localisation: Phelma |
|
|
|
vieux fous, vous allez mouwiw
_________________ 6A Phelma inside
quoi de la viande après le poisson?
bah non c'est pas un problème, il suffit de prévoir... en plus c'est délicieux !
par contre, les champignons et Phelma c'est signé Dédé... |
|
Jeu Juin 28, 2007 2:34 pm |
|
|
Britman
Bouillie de pingouin aux sucs digestifs
Inscrit le: 29 Déc 2006 Messages: 5055 Localisation: ENSPG Grenoble |
|
|
|
#include <iostream>
#include <iomanip>
#include <fstream>
#include <cmath>
#include <cstring>
#include "BmpLoader\bmp.cpp"
#include <time>
using namespace std;
char hexas[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
const float _PI=3.14159265;
ofstream fout("sortie.dat");
void coordonnees(float *Q, float *U, float *V, float &u, float &v){
float det=U[0]*V[1]-U[1]*V[0];
if (det==0){
return;
}else{
u=(Q[0]*V[1]-V[0]*Q[1])/det;
v=(-Q[0]*U[1]+Q[1]*U[0])/det;
}
}
class couleur{
public:
int R;
int V;
int B;
couleur(int r,int v,int b){
R=r;V=v;B=b;
}
couleur(){
R=0;V=0;B=0;
}
friend couleur operator-(couleur c1,couleur c2){
couleur temporaire;
temporaire.R=c1.R-c2.R;
temporaire.V=c1.V-c2.V;
temporaire.B=c1.B-c2.B;
return temporaire;
}
friend couleur operator+(couleur c1,couleur c2){
couleur temporaire;
temporaire.R=c1.R+c2.R;
temporaire.V=c1.V+c2.V;
temporaire.B=c1.B+c2.B;
return temporaire;
}
friend couleur operator*(float nombre,couleur c){
couleur temporaire;
temporaire.R=(int) (nombre*c.R);
temporaire.V=(int) (nombre*c.V);
temporaire.B=(int) (nombre*c.B);
return temporaire;
}
};
void ecrire(string texte, couleur color){
if (color.R>255 || color.R<0>255 || color.V<0>255 || color.B<0){
for (int h=0;h<texte.size(); h++) fout << " ";
}
fout << "<font color=\"#";
fout << setfill('0') << setw(2) << hex << color.R;
fout << setfill('0') << setw(2) << hex << color.V;
fout << setfill('0') << setw(2) << hex << color.B;
fout << "\">" << texte << "";
cout << texte << endl;
}
void degradeverticallineaire(string texte,int nlignes,couleur debut, couleur fin){
for (int i=0;i<nlignes;i++){
float pente=( (float) i ) / ( (float) (nlignes-1));
couleur temporaire=debut+pente*(fin-debut);
ecrire(texte,temporaire);
fout << endl;
}
}
void degradehorizontallineaire(string texte,int ncolonnes,couleur debut, couleur fin){
for (int i=0;i<ncolonnes;i++){
float pente=( (float) i ) / ( (float) (ncolonnes-1));
couleur temporaire=debut+pente*(fin-debut);
ecrire(texte,temporaire);
}
}
void degradematriciellineaire(string texte, int nlignes,int ncolonnes,couleur hautgauche, couleur hautdroite, couleur basgauche, couleur basdroite){
for (int i=0;i<nlignes;i++){
float pente=( (float) i ) / ( (float) (nlignes-1));
couleur debut=hautgauche+pente*(basgauche-hautgauche);
couleur fin=hautdroite+pente*(basdroite-hautdroite);
degradehorizontallineaire(texte,ncolonnes,debut,fin);
fout << endl;
}
}
float norme(float *U){
return sqrt(U[0]*U[0]+U[1]*U[1]);
}
float surface(float *U,float *V){
return abs(U[0]*V[1]-U[1]*V[0]);
}
void degradematricielinterpole(string texte, int nlignes, int ncolonnes, int *X, int *Y, couleur *couleurs,int taille)
{
int size=texte.size();
for (int i=0;i<nlignes;i++){
for (int j=0;j<ncolonnes;j++){
int It,Jt,Kt;
float ut,vt;
float min=-1;
for (int I=0;I<taille;I++){
for (int J=0;J<taille;J++){
for (int K=0;K<taille>=0 && u<1>=0 && v<=1 && S!=0){
It=I;Jt=J;Kt=K;
ut=u;vt=v;
}
}
}
}
//cout << dec << i << " " << j << " " << It << " " << Jt << " " << Kt << " " << 1-ut-vt << " " << ut << " " << vt << " ";
couleur color=(1-ut-vt)*couleurs[It]+ut*couleurs[Jt]+vt*couleurs[Kt];
cout << setfill('0') << setw(2) << hex << color.R;
cout << setfill('0') << setw(2) << hex << color.V;
cout << setfill('0') << setw(2) << hex << color.B << " ";
/* for (int I=0;i<taille;i++){
if (i+1==X[I] && j+1==Y[I]) color=couleurs[I];
}
// cout << color.R << " " << color.V << " " << color.B << endl;*/
ecrire(string(texte,j%size,1),color);
}
fout << endl;
}
}
void serpentvertical(string texte, int nlignes, int noscillations, int largeur){
for (int i=0;i<nlignes;i++){
float T=((float) nlignes)/noscillations;
int position= (int) (largeur+largeur*sin(2*_PI*i/T) );
string vide(texte.size(),' ');
for (int k=0;k<position;k++) fout << vide;
fout << texte << endl;
}
}
void serpentverticaldegrade(string texte, int nlignes, int noscillations, int largeur,couleur haut, couleur bas){
for (int i=0;i<nlignes;i++){
float T=((float) nlignes)/noscillations;
int position= (int) (largeur+largeur*sin(2*_PI*i/T) );
for (int k=0;k<position;k++) for (int p=0;p<texte.size();p++) fout << " ";
ecrire(texte,haut+(((float) i)/(nlignes-1))*(bas-haut));
fout << endl;
}
}
void dessinBitmap(string texte, char *nomfichier){
CBmp bmp;
bmp.Load(nomfichier);
s_rgb **pix=bmp.Bitmap();
int size=texte.size();
for (int i=0;i<bmp.Width();i++){
for (int j=0;j<bmp.Width();j++){
couleur color;
color.R=(int) pix[i][j].r;
color.V=(int) pix[i][j].g;
color.B=(int) pix[i][j].b;
ecrire(string(texte,j%size,1),color);
}
fout << endl;
}
}
int hasard(int min, int max){
return (int) (min + ((float) rand() / RAND_MAX * (max - min + 1)));
}
main(){
}
_________________ Et paf l'évier !
Phelma c'est bien... ou pas ?
Phelma |
|
Jeu Juin 28, 2007 3:04 pm |
|
|
Britman
Bouillie de pingouin aux sucs digestifs
Inscrit le: 29 Déc 2006 Messages: 5055 Localisation: ENSPG Grenoble |
|
|
|
un beau générateur de flood multicolore
_________________ Et paf l'évier !
Phelma c'est bien... ou pas ?
Phelma |
|
Jeu Juin 28, 2007 3:06 pm |
|
|
|