- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
I have been trying to fix this since two eeks and I have no clue what I am doing wrong. I have gotten the program to work so that it can tell if a number is prime or not, but the problem I am having is showing at the end … | |
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:
help me below algorithm. it gives wrong output e2 was wrong. 7.38..... [CODE]#include <cstdlib> #include <iostream> #include <math.h> using namespace std; int main(int argc, char *argv[]) { float x, err, term_1,result=1.0; int i=1,burcin; float factorial; cout << "x="; cin >> x; cout <<"error tolerance="; cin >> err; term_1=err+1; while (term_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:
INPUT's: 1) Name 2) Current date (month, day, year) 3) Birthday (month, day, year) The output will be the person's age in years, months, and days. See example below: Input name: shane Input current date: Month (1-12): 9 Day (1-31): 25 Year (yyyy): 2010 Input birthday: Month (1-12): 9 Day … | |
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:
Hello all, I need help with a scientific notation problem. I am to create a program where the user enters a 5 digit number, and it is displayed in scientific notation. This part is easy, however I am trying to take it to the next step and make it so … | |
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:
I am mostly familiar with C++. :?: Please help. Question is below : Write a program to discover how many numbers between 1 and 40 can be expressed as the sum of 4 positive squares (e.g. 15 = 12 + 12 + 22 + 32). | |
[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:
Here is simple c++ program to demonstrate matrix rain. Compiler:TurboC | |
Re:
Something that puzzles me in the following simple program: [CODE] #include <iostream> using namespace std; int main() { int row; cout << "enter row: "; cin >> row; int K[row], m[row][5]; cout << "Enter all the " << row << " K values:\n"; for (int i=0;i<row;i++) cin >> K[i]; cin.ignore(10,'\n'); … | |
Re:
hi every body>>>> please i am student and this my homework very important to me the question is : how to complete this simple program to make its return 0 ????? the answer is some thing instead of: [CODE] /* some statments */ [/CODE] please i am new here and … | |
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--) /* … |