49,761 Topics
| |
#include <iostream.h> double box_area(int); double box_vol(int); void main() { int l,w,d; double a,v; cout<<"length : "; cin>>l; a=box_area(l); cout<<"area : "<<a; cout<<"width : "; cin>>w; a=box_area(w); cout<<"area : "<<a; cout<<"length : "; cin>>l; a=box_vol(l); cout<<"volume : "<<v; cout<<"width : "; cin>>w; a=box_vol(w); cout<<"volume : "<<v; cout<<"depth : "; cin>>d; a=box_vol(d); … | |
failing to install codeblocks on my machine , running windows 8. its saying the program cannot be verified.....anything to help please! | |
Hi guys/ and the minority of girls. This topic is for my teacher, who has asked me to find information of the following for himself. How can he interface a USB port to run a motor through C++? He is relatively good with computer systems himself, so why he does … | |
Hello everybody, This is parking program .I defined 4 task (keyboard,enter vehicle,exit vehicle,display) The program is compile but when I run it and press keys (E,S,F), it does not work. This program is written for linux. Can you help me? #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <stdlib.h> #include <pthread.h> … | |
Literally, I have been asked this question ""The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, … ; the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms – i.e., Fib[n] = Fib[n – 1] + Fib[n … | |
Everything was running fine, then I made a simple change. Like adding a class or two and bang!!! C2995. Can you spot where I have obviously gone blind and cannot see the error. I have header gaurds throughout the solution, so I dont understand why this is happening. Here are … | |
I recently learn about the polymorphism and I don't know what is the purpose to use this feature. From http://www.cplusplus.com/doc/tutorial/polymorphism/ , it uses the child class rather than the parent class. I thought most of the time we inherit and we only use the parent class to access the child. … | |
Hi, I do have doubt regading use of delete p . In most of the scenarios we call delete inside the destructor if we would have called something int *p = new int (10); but as per below code snippet (original code of delete p) it already invoke the destructor … | |
Can anyone please explain to me how to compute DCT? I'm finding it hard to understand it. ![2D-DCT](/attachments/large/3/2D-DCT.png "2D-DCT") ![dct1](/attachments/small/3/dct1.png "align-right") I attached the formulas the Discrete Cosine Transform (DCT) and it's Inverse-DCT. | |
Roots of quadratic equcation #include<iostream.h> #include<conio.h> #include<math.h> void main() { float a,b,c,disc,root1,root2; cout<<"enter a"<<endl; cin>>a; cout<<"enter b"<<endl; cin>>b; cout<<"enter c"<<endl; cin>>c; disc=(b*b)-(4*a*c); root1=(-b+sqrt(disc))/(2*a); root2=(-b-sqrt(disc))/(2*a); cout<<"root1"<<root1<<endl; cout<<"root2"<<root2<<endl; getch(); } any question or assignment ask to me!guys | |
Alright so my problem is I am getting an error that says undefined reference to all of my functions related to DoubleLinked, DoubleLinked<string> dict, dict.add, etc. If anyone knows why that would be great. Thank you. Oh and if i add () to DoubleLinked<string> dict then i just have undefined … | |
A dark mage casted a black spell On the fountain of life.So,instead of producing the elixir of life,the fountain now produces the elixir of life and the dark poison at rate r (litet/sec). the fountain will become deadly when the amount of poison is the as that of elixir in … | |
I am trying implementing a vector ADT by means of an extandable array used in circular fashion. So now I want to apply the doubling strategy to double the current size of array Wheenever the full exception happens, by using a template to make the vector work here are my … | |
Dear All, I require to download a webpage, analyse the html and from that html I have to identfiy some required images and download them for analysis.Please help as to which library I would have to download and install. Is cURLpp good for this.? for the image analysis thing i … | |
http://libraryofcprograms.blogspot.com/2013/03/initializing-character-array-structs.html Is there any other way to initialize a chararcter type array in structs? | |
Let f1 and f2 are two user defined functions. main(){ int *p; f1(&p) } f1(**p){ f2(&p);//If I've to pass the pointer by reference again in another function, will I've to do something like this? } f2(***p){ **p = NULL; } | |
#include <iostream> #include <conio> #include <windows> void main() { int opt; cout<<"\t\twhich type of window you have\n\t\tEnter one for shoutdown for windows xp\n\t\tEnter 2 for windows 7\n"; switch(opt) { case 1: system("C:\\WINDOWS \\System32\\shutdown-s-t-0"); break; case 2: system("C:\\WINDOWS \\System32\\shutdown/s/t 0"); break; } getch();} using borland execute that program and shutdown your … | |
Hello All, First - I am just a beginner at this (just started studying C++ this semester) so I am lost somewhat sometimes and I think I am making good headway with my first array, but, I can not get it to return any output in my console window. I'm … | |
Question is Write a modular program (function) for problem given below. This program will let you enter the initial balance for the month, followed by a series of transactions. There is no limit on the number of transactions the program can process. A transaction takes the form of two input … | |
Hello, *We are very much begginers at programming in general, and it would be great if you could keep that in mind when helping us!* Could someone please explain just what a **socket** is? We are working on a program which will solve a 3D puzzle, handed to us by … | |
hey guys ! i have been given an assignment as pasted below : You will be given two files. Grid.txt will contain a grid of letters (as shown below) j q v r l k u v e r s i o n l d v k e r n … | |
Hello all. I wrote a program that gives me 100 random values from the range between -100 to +100. How am I supposed to find the minimum, maximum, and average of the values that will be listed when I run the program? I appreciate the help anyone can give me. … | |
Hi there, Years ago I posted in an InstallShield forum to see how I can detect if a patch has been applied on a particular machine programmatically. We have an update utility that will fire a Myapp.msp if it is detected in a particular folder. What is happening is that … | |
hello guys ! I need some help.. "assume that the process happen in some restaurant. there are seat1 until seat10 in the restaurant. the customer(user) need to enter the seat number to select the seat that they want. the seat that have been selected by customer will remark by 'reserved' … | |
Hello, I'm having a play with Qt and can draw what I want, perform transforms, more the origin with a translation but would like to know how big the area I have to paint on is and is it possible to control this. I've read the entries for things like … | |
When I run my makefile I get this error: ** No rule to make target `videofeatures.cpp', needed by `videofeatures.o'. Stop. Here is my makefile CC = gcc CPP = g++ CFLAGS += BIN_DIR = ../bin INC_DIR = ../include LIB_DIR = ../lib INCL = -I$(INC_DIR) `pkg-config --cflags opencv` LIBS = -L$(LIB_DIR) … | |
I want to change the color of the text in c++. I am using Turbo c++ 4.5 and Windows XP. I have used that textcolor(14) type code but it didn't work. It says : Call to undefined function "textcolor" in function main I have included header files iostream.h, conio.h, windows.h, … | |
Hi there guys. Literally I have been asked this question; "The Fibonacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, … ; the first two terms are 0 and 1, and each term thereafter is the sum of the two preceding terms – i.e., Fib[n] = Fib[n – … | |
I am given a number n and a number b. i have n products and for each product a grade like 'e' for electronics or 'f' for food. I must show only the products with a number of grades smaller or equal to my given b It's like: n=4 b=1 … | |
If p is a pointer pointing a node to be deleted, then what's wrong in the following code: cout << "Do you want to delete this record? (y/n) "; if (getch() == 'y' || getch() == 'Y'){// Delete record. if (p == *ph){//If first node is to be deleted. *ph … |
The End.