49,761 Topics
| |
I wrote the following code for a homework problem, but it's stuck in an infinate loop. I'm not sure how to correct that problem. The other issue is I want the answer to be given in two decimal places and not rounded in any way and it appears that my … | |
I am trying to compile some software I found online. I am getting a bunch of these errors: [code] No rule to make target `/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stdarg.h', needed by `formCluster.o'. Stop. [/code] In the Makefiles, there are certainly lines like this: [code] transform.o: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/stddef.h [/code] The errors seem to go away if … | |
I'm going to build a text editor in Turbo C++ 3.0 , but i don't know how a text editor works . I want to know the working of text editor , any tutorials ? Please help | |
i am trying to create a function that i can put in my program but i have got myself stuck. basically i have a string that contains letters. for example 'gototheshopatnoon'. from that string i need to transfer all the letters to another array and discard any duplicate letters. so … | |
I have a homework assignment that where I need to find the longest word that has the most amount of consectutive vowels. here is the description: The text file words.txt contains an alphabetically sorted list of English words. Note that the words are in mixed upper and lowercase. Write a … | |
How can i get a file from a server (any machine) using ftp in C++ i searched alot in ftp in C++ but i got a huge cpp files and header files ana i dont understand so much from there.. and my Dr tell me that i need a small … | |
[code] #include <iostream> #include <vector> using namespace std; int main () { int N =0; int Range=0; int NumberOfCases=0; cout << "Enter N" <<endl; cin >> N; cout << "Enter Range" <<endl; cin >> Range; cout << "Number of cases" <<endl; cin >> NumberOfCases; vector<double> range_time_Vector(Range); int K = N; … | |
[CODE]//function example #include <iostream> #include <cmath> using namespace std; float cutoff(float& windchill) { int z; z = (int)(windchill + 0.5); return(z); } float calculate (int& t, int& v) { float windchill; windchill = 35.74 + (0.6215 * t) - 35.75 * pow(v,0.16) + 0.4275 * t * pow(v,0.16); return(windchill); } … | |
I was wondering if its possible to specify the name of a file being created with a variable yet still specify the extension for the file. Example: [code] string name; cin >> name; ofstream myfile; myfile.open(name".sta", ios::out); [/code] i was wondering if you could do something of the sort i … | |
I am trying to get some code I found online to compile. It looked like this: [code] #include <iostream> #include <list> using std::list; template <class T> class leda_list : public std::list<T> { private: iterator loopIter; [/code] the error was: ‘iterator’ does not name a type I tried changing it to: … | |
Hi, how can i transfer variable from one dialog class to another. For example i have int i = 10; in my first(global variable). How to obtain this value in the second class? I have int i1; How can i i1 get the value of i ? Thanks in advance! | |
I need to make this formula c++ compatible, ive spent quite a while trying to figure this out, looking for some help! WindChill = 35.74 + 0.6215T - 35.75(V^0.16) + 0.4275T(V^0.16) Thanks! | |
I have a matrix A stored in column major order as 1 3 2 4 and I'm using this function to output it in row major order, i.e. 1 2 3 4 which is does correctly. However I'm confused about how it does this, as I thought the loops would … | |
i am supposed to have 2 void functions and 4 value returning functions (including main) to eventually calculate netsalary from calling the specific functions to calculate tax and insurance and receive and display data.... basically i'm wondering what is my error (compiled in dev and couldn't figure out what was … | |
Thats the code I am trying to do, what I try to do is a loop, that only breaks if the user press enter. any other ideas? [CODE] while(GetAsyncKeyState(VK_RETURN)==0) {}[/CODE] | |
Hi, I am using Visual studio 2008 express edition now. It does not have stdafx.h. so I download stdafx.h and three other head files: AFXWIN.h, AFXEXT.h and AFXCMN.h from google. I put these four headfiles into C:\Program Files\Microsoft Visual Studio 9.0\VC\include. And then I wrote a small program just to … | |
Basically, this is what I'm trying to acheive in its simplest form. [IMG]http://img72.imageshack.us/i/dsgjgsfnhfn.jpg/[/IMG] Does anyone know how to change sin/cos in this way? I just require them to linearly increase/decrease over the set amount of time set on the x axis. In case of the link not working, these are … | |
hey guys its 1.30 am and I just can't see where the problem here ! the text file contains just brand , model and price, please help ! [CODE] #include<iostream> #include<fstream> using namespace std; struct computer{ char * brand ; char * model; double price; }; void readin(computer * , … | |
ok so i need to allow the user to enter a number they want or delete that number from an array. Then i need to combine those arrays(union) and then find out which elements are common(intersection). only numbers 0-100 are allowed to be entered. so if an element is in … | |
out teacher told us to make a timer. interfacing the timer circuit we've made and parallel connector and using c++ program to control the flow of the timer. we should able to control start, stop, and reset. my problem is the code for it and the connection of parallel connector … | |
I am going to write a game with QT but i dont know how to start. Give me a tutorial for QT please. | |
Hi, I've made a class whose member is a reference to a dynamically created object. How should I code a destructor? | |
May I know use of Method returning a pointer in C++, please? Thanks. | |
hi what is the difference between : [CODE]main(){}[/CODE] [CODE]void main(){}[/CODE] [CODE]int main(){}[/CODE] [CODE]int main(void){}[/CODE] with my best wishes,, | |
How to convert binary numbers to decimal numbers and decimal numbers to binary numbers? help!!!!!! | |
It might be a basic question, but bear with me as google didnt help. I want to create awrapper for cmd.exe that is more comfortable in terms of user interface (I enjoy a lot Konsole in *nix). Right now I have no Idea how to hook to cmd.exe and get … | |
I am trying to build a class with definitions that will output the following... Income tax for year 2009: Name: John Doe Address: 1234 Alphabet Lane, City, State Zip SSN: 111-11-1111 DOB: 11-11-1111 I have built my class and source code to define the function members. But I am running … | |
[I]<< thread split from [URL="http://www.daniweb.com/forums/post1142786.html#post1142786"]here[/URL]>>[/I] [CODE]# include <iostream> #include<iomanip> # include <string> #include<fstream> #include<cctype> #include<conio.h> #include<windows.h> using namespace std; struct Name { string Fname; string Lname; }; struct date { int D; string M; int Y; }; struct patient { int PID; Name Pname; string age; string address; string tel; … | |
Hello everyone! I want to create a programme with some number of functions inside it. The programme would run quietly in the background and wait. Each function in the porgramme would have it's own pre-defined HotKey, after pressing one of those on the keyboard the corresponding function would run. All … | |
I am trying to parse a text files which has blank lines. The getline function is supposed to read blank lines and move on to the next lines. However, my text file is like this : ABC..... DEF...... HIJ...... I am able to reach the lines before the blank lines … |
The End.