48,986 Topics

Member Avatar for
Member Avatar for daviddoria

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: …

Member Avatar for daviddoria
0
269
Member Avatar for ge6a93

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!

0
55
Member Avatar for JHus00

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!

Member Avatar for JHus00
0
88
Member Avatar for sexyzebra19

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 …

Member Avatar for Dave Sinkula
0
140
Member Avatar for nuB

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 …

Member Avatar for nuB
0
162
Member Avatar for D4n1sD

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]

0
68
Member Avatar for Cristofor

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 …

Member Avatar for Dave Sinkula
0
171
Member Avatar for kirennian

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 …

Member Avatar for Salem
0
157
Member Avatar for ravenrider

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 * , …

Member Avatar for Salem
0
124
Member Avatar for corby

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 …

Member Avatar for Salem
0
254
Member Avatar for rush52490

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 …

Member Avatar for dmitry_n
0
68
Member Avatar for Asalearam

I am going to write a game with QT but i dont know how to start. Give me a tutorial for QT please.

Member Avatar for Stefano Mtangoo
0
528
Member Avatar for mmasny

Hi, I've made a class whose member is a reference to a dynamically created object. How should I code a destructor?

Member Avatar for mmasny
0
148
Member Avatar for Coder2009
Member Avatar for Stefano Mtangoo
0
110
Member Avatar for Aser10

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,,

Member Avatar for Aser10
0
77
Member Avatar for jhegie
Member Avatar for GDICommander
0
207
Member Avatar for Stefano Mtangoo

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 …

Member Avatar for Stefano Mtangoo
0
764
Member Avatar for Tech E

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 …

Member Avatar for Fbody
1
117
Member Avatar for Nafaiz

[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; …

Member Avatar for Nick Evan
-2
82
Member Avatar for noofin

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 …

Member Avatar for mitrmkar
0
123
Member Avatar for Grap

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 …

Member Avatar for VilePlecenta
0
9K
Member Avatar for Swiftle

Hello there, I'm writing a dictionary that stores keywords and the pages which contain the keyword. This is a follow-up on a PageRank algorithm we're doing for an assignment. The first part is the read from a file containing all the web addresses and store the in a matrix, and …

Member Avatar for mitrmkar
0
137
Member Avatar for Cristofor

Hello, I installed Microsoft Visual Studio 2008 Express Editions last week. Then I found there are many head files missing, such as: matrix.h stdafx.h matlablink.h itpp/itcomm.h Should I uninstall Microsoft Visual Studio 2008 Express Editions and then install Microsoft Visual Studio 2008 Standard Editions? Is there free download version of …

Member Avatar for Cristofor
0
116
Member Avatar for cyfuzhi

Hi all, i'm writing this code that will prompt the user for a cstring of 25 chars...store it and prompt a char to find...then with a function search for that char from the cstring. i got it working with a while loop, but only if i enter a char thats …

Member Avatar for jonsca
0
69
Member Avatar for HealBrains

Hey all, I'm trying to do some ray intersection detection but I'm having some problems. My app starts by loading a cube object into a .x file. I have a player class and a target class that both use the same model, but each has it's own world matrix. [CODE]D3DXMATRIX …

Member Avatar for HealBrains
0
205
Member Avatar for faaz

The problem is that the program would not terminate if either the human or the computer reach 100 or above points. it is not displaying if the human wins that you won or if the computer wins then sorry you lost, try again. [CODE] #include <iostream> #include <ctime> using namespace …

Member Avatar for faaz
0
173
Member Avatar for KRal

/*The Fraction + and Fraction / are not being allowed to access private members declared in class Fraction. Any suggestions? */ [CODE]class Fraction { public: Fraction(); Fraction(int, int); void setNum(int); void setDen(int); int getNum(){return num;} int getDen(){return den;} void reduce(); void print(){cout << num <<"/"<< den;} friend ostream& operator << …

Member Avatar for mrnutty
0
134
Member Avatar for Kikazaru

Is there any way to reduce the number of times you have to write: template<typename T> for a bunch of functions all using the same template parameters? i.e., something like this: template<typename T> namespace my_functions_using_T { T function_do_something(const T & t); void function_do_something_else(T & t); } (besides making them all …

Member Avatar for Kikazaru
0
106
Member Avatar for lloydi12345

Hi, i really don't know what to do guys can you help me with this code for my matrix program? this program is not yet finished and i am stuck with this problem [CODE]#include <iostream> #include <math.h> using namespace std; int main() { int rotx, roty, rotz, n, ac1, ac2, …

Member Avatar for WaltP
0
126
Member Avatar for Volestar

Ok, I've been working on this for about 4 hours, but I cannot get it to work! I'm starting with a char, then I need it to become a const char so I can use strcmp in my if statements. If there's anything wrong in that idea, please tell me …

Member Avatar for WaltP
0
228

The End.