- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
35 Posted Topics
Re: [CODE]#include <stdio.h> pls use this program it is working. int main () { int sayi, sayi2, k1, k2, flag; int total=0,count=0; printf (" enter first integer number : "); scanf (" %d", &sayi); printf ("enter second integer number : "); scanf (" %d", &sayi2); for (k1=sayi; k1 < sayi2 ;k1++) … | |
I made a simple color finding game. the problem is that my color input guess is not good so complex I want them in one line and also I want to see my tries at certain places. can you help me thanks in advance. [CODE]#include <cstdlib> #include <iostream> #include <string> … | |
there are two scripts, first, square.h second square.cpp this test program is trying to calculate square and cube of the given number but i have a problem with cube function definition. [CODE] #include <iostream> #include <conio.h> using namespace std; class square { int x; public: void set_values (int); int erek … | |
i made a class test program with telephone directory. it writes name and telephone number but not surname i have used return name,surname which does not carry both string. is it possible to do them without writing another function script. thanks in advance [CODE]#include <cstdlib> #include <iostream> using namespace std; … | |
i made a test program, this line " *ps.Working_Hours=10;" generates mistake. why ? [CODE]#include <cstdlib> #include <iostream> using namespace std; class Salary { public: int Working_Hours; float hour_rate; float x; }; int main(int argc, char *argv[]) { Salary s; float yy; s.Working_Hours=7; s.hour_rate=30.5; Salary* ps; ps=&s; *ps.Working_Hours=10; cout << "s.hour_rate=" … | |
test program, dont understand after calling function it goes two times destructor "-5" is it wrong ? [CODE]#include <cstdlib> #include <iostream> using namespace std; class calculation { public: calculation(); // constructor ~calculation(); // destructor. }; calculation::calculation() { cout << "5"<<endl; } calculation::~calculation() { cout <<"-5"<<endl; } calculation function_one(calculation addition); int … | |
easy program... but x_1 and x_2 strings dont change after return from function I expect 50 and 70 but still keeps declaration value. [CODE]#include <cstdlib> #include <iostream> using namespace std; void absurd (string a, string b) { a="50"; b="70"; } int main(int argc, char *argv[]) { string x_1="burcin"; string x_2="erek"; … | |
Re: Dear friend, your program is not correct. I could not catch the correct answer cout ex... I found my mistake in my program... burcin++ is correct. ++ burcin was wrong my assistant found it. thanks anyway. [QUOTE=vijayan121;1376166]Not really; it would be something like that. 7.389056... In [ICODE]1 + x/1! + … | |
1>------ Build started: Project: allegro, Configuration: Release Win32 ------ 1> allegro.cpp 1>MSVCRT.lib(crtexe.obj) : error LNK2001: unresolved external symbol _main 1>c:\users\lenovo\documents\visual studio 2010\Projects\allegro\Release\allegro.exe : fatal error LNK1120: 1 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== | |
Pls check the code. for example during betting if you write "One" if the dice comes 1, you win. but when you write one it writes 2.28 1026 why. I dont want case sensitive and it would be perfect if the first and second character I write for input, it … | |
I want to generate 10 random numbers. but all numbers will be different. so I tried to use bool first make all false. and each generate, assign that argument with bool but someting is wrong. because outcome is not correct. [CODE]#include <cstdlib> #include <iostream> #include <ctime> #include <windows.h> using namespace … | |
this program is trying to add from 1.. to x with return function. but when I enter 10 sum is 54 which is wrong. 1,2,3,4,5,6,7,8,9,10 = 55 [CODE]#include <cstdlib> #include <iostream> int burcin(int); using namespace std; int main(int argc, char *argv[]) { int x; int ft=0; cout << "enter the … | |
[CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; void x(); void x(char); void x(char,int); void x(char,int,char); void x(int); void x(char); int main(int argc, char *argv[]) { x(); x('B'); x('E',30); x('B',30,'E'); x(10); x('V'); getch(); } void x() { for(int j=0;j<50;j++) cout << '*'; cout << endl; } void x(char xx) … | |
Re: pls try [CODE]#include "stdio.h" #include "conio.h" int ay,yil,gun,a,y,g,guns,ays,yils; main() { a=9; // todays month // g=27; // todays day y=2010; // todays year printf("enter the day ");scanf("%d",&gun); printf("enter the month:");scanf("%d",&ay); printf("enter the year:");scanf("%d",&yil); if(gun>g) { g=g+30; a=a-1; guns=g-gun; } else guns=g-gun; if(ay>a) { a=a+12; y=y-1;a ays=a-ay; } else ays=a-ay; yils=y-yil; … | |
the program is running well but concept is wrong. you should find number 0-100 until 10 trials. if failed, and want to play again unfortunately program is terminated why ? [CODE]#include <cstdlib> #include <iostream> #include <windows.h> using namespace std; int sayiturev (int aralik) // generating number 1-100 { srand(GetTickCount()); int … | |
i found msoftcon.h on the book and added. when i run below program on dev c compiler linker error undefined reference to set_color(color,color) linker error undefined reference to set_fill_style linker error undefined reference to draw_circle linker error undefined reference to init graphics [CODE]#include <cstdlib> #include <iostream> #include <msoftcon.h> using namespace … | |
pls would you help to draw a circle using with msoftcon.h library. but it does not work on dev-c compiler. i checked the files it does not cover msoftcon.h on dev-c where to find this library for graphical shape. thanks in advance. | |
[CODE] #include<iostream> #include<fstream> #include<conio.h> #include<stdlib.h> using namespace std; void write(); void rear(); void search(); void write() { int no; char name[80],surname[80]; ofstream file("student.txt",ios::out|ios::app); cout<<"name:"; cin>>name; cout<<"surname :"; cin>>surname; cout<<"number :"; cin>>no; file<<name<<""<<surname<<""<<no<<"\n"; file.close(); } void read() { string line; ifstream file("student.txt",ios::in); if(!file){cout<<"file not found.\n"; getch(); exit(1);} while(!file.eof()) { getline(file,line); cout<<line<<endl; … | |
there are four playing cards . you choose one of them if selected card is 1 spades you win else you lose but ı want to make win card as random from 4 cards. i dont know how. [CODE] #include <cstdlib> #include <iostream> using namespace std; const int clubs=0; const … | |
wrong reading. wht I want is name and surname=burcin erek number=783389 but output name and surname=burcin number=erek it is so funny but no solution. #include <cstdlib> #include <iostream> #include <fstream> #include <conio.h> #include <string> using namespace std; void file_read() { string name1; string numb1; ifstream f("file1.txt"); f>>name1>>numb1; cout << "name … | |
distance does not name type mistake even though I suppose that I am right. pls help [CODE]#include <cstdlib> #include <iostream> #include <conio.h> #include <sstream> // struct unit with loop inside.... using namespace std; struct distance { int mt; float cm; }; struct room { distance length; distance width; }; int … | |
5 student picked up 5 balls. they do not choose same number but during print out process, the program is writing different ball number i dont know why? [CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; int main(int argc, char *argv[]) { int i; int ogr[5] = {0}; // … | |
Re: [CODE]using namespace std; void printN(char ch, int N){ while(N--) cout << ch; }[/CODE] this part is so cute. N=numbersize()-i-1 he puts in while N-- for making exact number of zero with char. if i am right, it is so amazing | |
hello it is easy program but there is a mistake in void application while printing the birthday, pt pointer gives a mistake why? [CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; struct Date { int day; int month; int year; }; void printdate(Date* pt) { cout << "\nbirthday= "<<*pt->day<<"."<<*pt->month<<"."<<*pt->year; … | |
Re: is it this ? [CODE] #include<iostream> #include <conio.h> #include <Windows.h> using namespace std; int main() { int sum=0; for (int x=1;x<40;x++) {sum= x*x+(x+1)*(x+1)+(x+2)*(x+2)+(x+3)*(x+3); cout<<x<<".value="<<sum<<"\n"; Sleep(1000); } system ("pause"); } [/CODE] | |
[CODE]#include <iostream> #include <conio.h> using namespace std; main() { int a,b; b=50; cout<<"enter a value less than 50: "; cin>>a; do { cout<<"A number: "<<a<<endl; a++; Sleep(100); } while (a<=b); getch(); return 0; } [/CODE] | |
Re: too many errors with dev c compiler | |
Re: for(int i=0,j=0;i<row, j<4;i++,j++) does it make any sense for reducing j to 4 .. | |
Re: you try this may be it works [CODE]int main() { cout << "Press enter to continue" << endl; cin.ignore(); return 0; }[/CODE] | |
there is a mistake on the code. I would like to write "test" like t e s t but it writes reverse. it is easy but my brain is not enough. [CODE]#include <iostream.h> #include <string.h> #include <conio.h> int main(void) { char *pointer="test"; int index; for(index=(strlen(pointer)-1); index >= 0; index--) /* … | |
Re: I am very new . I wrote on my own. pls check #include <cstdlib> #include <iostream> #include <conio.h> using namespace std; int main(int argc, char *argv[]) { int G1; int G2; char G3; int G4; float final,mean1,mean2,mean3; cout << "grade 1="; cin >> G1; cout << "grade 2="; cin >> … | |
Re: [CODE] #include <stdio.h> #include <conio.h> int main (void) { int basilanTus, /* Basılan tuş karakteri bilgisini tutacak değişken */ devam = 1; /* Döngü denetim değişkeni */ printf("press a key \n(for exit press 'q' )\n\n"); while (devam) /* Sonsuz döngü */ if (kbhit()) { /* Bir tuşa basıldı ise */ … | |
error message is seen on the goto statement. did I miss library ? this is a part of script. #include <cstdlib> #include <iostream> #include <conio.h> using namespace std; int main() { int a = 0, b = 0, c = 0; cin >> a >> b >> c; //assume error … | |
Re: #include <iostream> #include <stdio.h> #include <math.h> #include <conio.h> using namespace std; struct StatData { double Data[10]; double mean; double stdDev; double variance; }; int main() { double sum=0,mean=0; double stdDevSum=0; double temp=0; int i=0; int j=0; int Data[] = {24,21,24,43,31,41,42,34,41,45}; for(i=0;i<10;i++) sum=Data[i]+sum; mean = sum/10; cout << mean; getch(); } … | |
Re: variable identifications were wrong. all were created float , you have to classify and reaarange it will work |
The End.