Hi,
In one hour, it's my final exam. To be ready, I would greatly appreciate if someone could show me an example of the bubble sort to sort an array that contain a structure. If for example, I...
Type: Posts; User: nevrax
Hi,
In one hour, it's my final exam. To be ready, I would greatly appreciate if someone could show me an example of the bubble sort to sort an array that contain a structure. If for example, I...
Ok, thanks for the info. Unfortunatly, I don't really know what's non-stantard (except what you're telling me)since my teacher know nothing of C and she dosn't care at all about standard program. I...
you're right, I've posted to fast. With
fputs(TabEmployee[i],pFichier);
I got the following message
539 H:\420-2pf\Projet.cpp cannot convert ` AjouterEmploye()::EMPLOYE' to `const char*'...
this
void AjouterEmploye(void)
/*----------------------------------------------------------------------------*/
{
clrscr();
gotoxy(20,23);
int iNoEmploye;
This is what i'm trying to do but unfortunatly, with a structure, I am not able to do something right. I would help me if I could have an example please.
Thanks, now I want to print a structure in a file without overwriting it (because it's information about different person and I want them all in the file.)
typedef struct {
int iNo;
...
Hi,
I would like to know how to do something like that:
scanf ("%d",iNoEmploye);
&TabEmploye[iNoEmploye].iNo = iNoEmploye;
Thanks
If you'd been good
I belive I said many time that I wasn't good.
Thanks for your help
Thanks for that lesson, I shall remember the importance of identation. By the way, here is what the file mesage should look like.
Produit 10 non trouve --> transaction IGNOREE
Produit 12 non...
I added the braces but now, the output is repeted more than once and th result is still wrong. I am currently desperatly trying to correct this logic mistake, as well as the other one concerning the...
I belive that the program ignore the if/else for some reasons. I tried to give adress (&) to some values but this did not change anything. Since I'm far from being an expert, could someone please...
Ok, with those stupid mistake corrected, I'm starting to see the light at the end of the tunnel. Now, remember when I was saying that I was putting the missing numbers in a message file. Well, he...
I did the modification concerning the pointers, unfortunatly, my program still crash before writing anything in a file.
More over u need to check for the files which u have opened for writing, i...
Hi,
I have some problem concerning files. I have a first one (PRODUIT.DAT) containing this.
11 MEMOREXCD 29.99 20.75 100
15 CARTOUCHENOIR 27.99 22.25 150
18 CARTOUCHECOULEUR 49.99 38.50 20...
Hi,
I'm pretty new with the notion of structure and I need some help. I would like to put, for example, the first name, last name, age and the phone number of a person in a structure like:
...
Forget that, everything work fine, you were right about storage in too small arrays, I tough the mistake was elsewere because it was working with char (when we are tired, these are stupid deduction...
You're right, I totally agree that I shouldn't put them in character array ( and my goal is to put them in arrays that match their variable type). But when I put
int sLimitInfStocke[7][5]; ...
Hi,
I have a file that look like this (for example)
1111 6666 0.12 1234
2222 7777 0.13 2345
3333 8888 0.14 3456
4444 9999 1.15 4567
5555 1010 0.16 5678
By the way, when I read the numbers in my float, I would like that my sscanf dosn't ad 0 like he does (when I display my float, he show me 40.000000 instead of 40.0000) or (850.50000 instead of...
Thanks for your help in all this dwks. For my personal culture I'll post a new thread and if no one know, I'll take your idea.
If you're speaking about
sscanf (ligne, "%s %f %s %[^ ]",sIdentif,&fRegle,sType,sDescript);
printf ("%s %f %s %s",sIdentif,fRegle,sType,sDescript);
it dosen't work, he...
It doesn't really work. I tried with [^s]" which work with qqq qqq qqq, but it dosn't work with sentences like "I'm playing rubic cube", he only show stuff like the 2 or 3 first word or the 2 first...
Ok, I get it (I had remove the 2 &)now everything work except that he stop reading the qqq qqq qqq after the space, so he only display qqq ( as expected), how can I fix this.
Ok, I did what you told me, here are the modifications
sscanf (ligne, "%s %f %s %s",sIdentif,&fRegle,sType,sDescript);
printf ("%s %f %s %s",sIdentif,&fRegle,sType,sDescript);...
I can send you my complete program if you want, but as I said, my string line already have TXSYN 0.0078 CIE qqq qqq qqq, I want to extract this content into 4 var.