- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 1
- Downvotes Received
- 12
- Posts with Downvotes
- 5
- Downvoting Members
- 6
13 Posted Topics
So here is what i have done I did the basics of c++ and was quite comfortable with them Now i wanted to start with the allegro gaming library so i downloaded the library and linked it with my compiler i compile a program and it compiles fine but when … | |
So here is what i have done I did the basics of c++ and was quite comfortable with them Now i wanted to start with the allegro gaming library so i downloaded the library and linked it with my compiler i compile a program and it compiles fine but when … | |
Hey everyone out there please help me with this code [code] #include<iostream> #include<stdlib.h> #include<time.h> using namespace std; int main() { long n; cout<<"Enter no. of random numbers to be generated\n"; cin>>n; int arr1[n]; srand(time(NULL)); for(int i=0;i<n;i++) { arr1[i]=rand(); } int x=0; int pos=0; double k=time(NULL); for(int i=0;i<n-1;i++) { x=arr1[i]; for(int … | |
Re: try this [code] #include<iostream> using namespace std; main() { int n,k,l; k=8; l=4; cout<<"Enter thenumber till the check should go"; cin>>n; for(int i=7;i<n;i++) { if ((k%2!=0)&&(k%3!=0)&&(k%5!=0)&&(k%7!=0)) {l++;} k++; } cout<<"\n"<<l; system("pause"); } [/code] | |
Re: just declare it in a class and mention your three functions in the class make an object in main and access the data | |
Re: simple your problem is that you sent the pointer address of your variable but when the function ended the memory was freed and when the pointer refered to that memory location it was empty you do this and you wont have to declare the variable global [CODE] char * tokenize_urls() … | |
Re: i think this typed code is wrong what the user want to do is to run the function fo until count;s value becomes 5 and it prints count everytime It should be like this [code] int f0() ( int count;//the user did not declare the variable count in the function … | |
| |
Re: just use system("pause") in the end before return | |
hey i just switched from turbo c++ to dev c++ i cant run the following program please help #include<iostream> using namespace std; int main() { int n; int k; cout<<"Enter the values\n"; cin>>n; cin>>k; if (n>k) {cout<<"The value entered first is greater ";} else {cout<<"The value entered 2nd is greater";} … | |
#include<IOSTREAM.h> main() { int rohan=0; int m=10; int l=10; int t=10; int flag1 =0; int flag=0; int temp; float temp1; long double n; double k; cout<<"ENTER N\n"; cin>>n; k=n; int camp; camp=k; while (flag1) { l*=10; camp/t; t*=10; if (camp == 0) {flag1=1;} } if ((1>n)&&(n>=1e6)) {cout<<"there is a error";} … | |
Re: use floating point numbers instead of integers and use a loop because you have made a calculator that can calculate only once. Please reply if you found these answers worthy | |
Hey i am a beginner in programming I typed the following program on my own But there are a lot of errors it it Please help me find them [CODE] #include<IOSTREAM.h> main() { int a,b,c,x; cout<<"Enter three values - \nA,B,c."; cout<<"A-"; cin>>a; cout<<"B-"; cin>>b; cout<<"c-"; cin>>c; if (a>b) x=1 else … |
The End.