Search Results

Showing results 1 to 22 of 22
Search took 0.01 seconds.
Search: Posts Made By: Fili ; Forum: C++ and child forums
Forum: C++ Jul 14th, 2004
Replies: 7
Views: 17,809
Posted By Fili
To Valmian: Comunicating functions are like:
class none
{
int x;
public:
int& getx()
{
return x;
}
};
Forum: C++ Jul 14th, 2004
Replies: 4
Views: 2,313
Posted By Fili
How about:

#include <iostream.h>
#include <ctype.h>
#include <conio.h>
void main()
{
cout<<"please enter first name, middle name and last name"<<endl;
cout<<"(max 20 chars each)"<<endl;...
Forum: C++ Jul 14th, 2004
Replies: 2
Views: 7,007
Posted By Fili
Well it's obvious you're using some sort of template or something I on't understand. To read text from a file use fgets(char *s,int nrchr,FILE *inpfile);
Since you're using fstream go for:
...
Forum: C++ Jul 8th, 2004
Replies: 13
Views: 31,079
Posted By Fili
To Dave: Thanks a lot. I've figured out why it sometimes would work and other times it would crash! When a pointer is declared in main(), it has a residual adress to a memory block. Therefore, it can...
Forum: C++ Jul 5th, 2004
Replies: 5
Views: 3,084
Posted By Fili
Hmm how about declaring 2 macros:

#define max(a,b) a>b?a:b
#define min(a,b) a<b?a:b
int max,int min;
...
max=max(x[0],x[1]);
min=min(x[0],x[1]);
for (i=2;i<n;i++)
{
Forum: C++ Jul 5th, 2004
Replies: 13
Views: 31,079
Posted By Fili
TO Asif_NSU:I must admit that in Dev C++ this doesn't work at all. BUT in the DOS version it WORKS very well. I'm using Borlamd C++ 3.1. This thing is highly useful for ME. I will be in the 8th form...
Forum: C++ Jul 3rd, 2004
Replies: 13
Views: 31,079
Posted By Fili
Do you think it actually matters?!

If you have:


int a=new int[8];
a[0]=23;
delete a;
cout<<a[0];
Forum: C++ Jun 21st, 2004
Replies: 11
Views: 16,081
Posted By Fili
ahh ok I see. Thanks Dave :)
Forum: C++ Jun 20th, 2004
Replies: 11
Views: 16,081
Posted By Fili
Well, that's what his problem said. Anyway i'm not a US or UK citizen so i'm not great at english :sad: What is a vending machine exactly?! :o
Forum: C++ Jun 20th, 2004
Replies: 6
Views: 15,844
Posted By Fili
I know they won't work in Visual C but I'm a Borland C++ (for DOS) user. :!:
Forum: C++ Jun 19th, 2004
Replies: 11
Views: 16,081
Posted By Fili
Thanks Fire Net :D Do you suppose it's too late for it to be of any use?
Forum: C++ Jun 19th, 2004
Replies: 11
Views: 16,081
Posted By Fili
ok... it's ready but it doesn't cover the part where the option is invalid ;)


#include <iostream.h>
#include <conio.h>
int dol,cen;
unsigned int cb=0,ch;
void convert(int cb)
{
...
Forum: C++ Jun 19th, 2004
Replies: 11
Views: 16,081
Posted By Fili
I'm writing your program though it might be too late! ;)
Forum: C++ Jun 18th, 2004
Replies: 6
Views: 15,844
Posted By Fili
You're right Fire Net.

The colour list is ok. you know that's why i use printf/scanf

In <conio.h> you may find: cprintf(...);cscanf(...) with the same paramters as ...scanf() and...
Forum: C++ Jun 18th, 2004
Replies: 4
Views: 3,287
Posted By Fili
Just asking Blood Night: What does output say?

what does 1n mean 1*n or 1n as a number; what do you mean???
( for all interested my e-mail is yuri@fx.ro-could you send answer here? )
Forum: C++ Jun 18th, 2004
Replies: 6
Views: 16,730
Posted By Fili
It should be answer (b)
Here's an example:

#include <iostream.h>
main()
{
char s[100];
cin.getline(s,100);
cout<<s;
}
Forum: C++ Jun 18th, 2004
Replies: 14
Views: 5,221
Posted By Fili
woops i'm from romania. "Numarul de termeni:" means how many elements you will input and "Suma obtinuta" means the sum you have obtained. My mistake! :o
Forum: C++ Jun 18th, 2004
Replies: 5
Views: 25,687
Posted By Fili
well if you include main() in a header that would be more like a program than like a header but anyway you can ;)
Forum: C++ Jun 17th, 2004
Replies: 14
Views: 5,221
Posted By Fili
Red_evolve... i've written a version for Q1 myself and it's pretty similar to yours (mine's a program---in my opinion you understood pretty good)

#include <stdio.h>
#include <conio.h>
long...
Forum: C++ Jun 17th, 2004
Replies: 5
Views: 25,687
Posted By Fili
It is very very simple:


write some functions||define some macros||define structures/classes etc...
DO NOT include a main() function
save it with the name you want
e.g...
Forum: C++ Jun 17th, 2004
Replies: 6
Views: 2,251
Posted By Fili
Well i'm a teen-ager myself (13). I recomend learning the PASCAL language then go to C. Pascal is far more basic; it doesn't have as many functions as C
BUT it is easier to use :mrgreen:
Forum: C++ Jun 16th, 2004
Replies: 5
Views: 35,405
Posted By Fili
Ok--try this (i'm not sure it's perfect...13 yr olds can make mistakes)

#include <stdio.h>
#include <conio.h>
#include <alloc.h>
struct nod
{
int info;
nod *adr;
};
Showing results 1 to 22 of 22

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC