49,761 Topics

Member Avatar for
Member Avatar for ztdep

[CODE]// // Media.h define the class cell // #ifndef MEDIA_H #define MEDIA_H #include<vector> #include<string> using namespace std; class Media { private: // media name string name; // the density vector vector<double> density; // the capacity vector vector<double> cp; // the thermal conductivity vector vector<double> thermalConductivity; // the viscorsity vector vector<double> …

Member Avatar for mike_2000_17
0
8K
Member Avatar for sadsdw

Hi friends, I'm retrieving some information from a input file with 10 columns and I need to get the first 3 columns and set into 3 different variables and the last 7 in the same variable. I was using "ifstream" and ">>" like: [CODE]myfile >> stringA; myfile >> stringB;[/CODE] ... …

Member Avatar for sadsdw
0
93
Member Avatar for mayanktalwar

open cv[code]#include <cv.h> #include <highgui.h> #include<stdio.h> int main() { cvNamedWindow( "Example2", CV_WINDOW_AUTOSIZE ); CvCapture* capture = cvCreateFileCapture( "a.avi" ); IplImage* frame; if(!capture) { printf("fail"); } else{ while(1) { frame = cvQueryFrame( capture ); if( !frame ) break; cvShowImage( "Example2", frame ); char c = cvWaitKey(33); if( c == 27 ) …

0
61
Member Avatar for reallyslick

I have not found a solution yet, please help! My header files are structs which house the declarations of my functions and the associated CPP file houses the implementation. I want to pass a string to my ADD and REMOVE but get compile errors.. [CODE]/// //Profiles.H /// #ifndef __PROFILES_H #define …

Member Avatar for ztdep
0
812
Member Avatar for ztdep

Dear friends: I have the following two classes.[CODE]#ifndef EQUATION_H #define EQUATION_H #include <stdlib.h> #include <map> class Mesh; class Equation { public: Equation(); virtual ~Equation(){}; void associateMesh(Mesh * _pMesh){ pMesh = _pMesh;}; virtual void addsItsVariables4PostProcessing(map<string,const Variable*> & variablesMap)=0; protected: string name; const Mesh* pMesh; }; #endif [/CODE] Before the class Equation, …

Member Avatar for ztdep
0
277
Member Avatar for bigdan182

hey, I promise i'm getting there!! so my code now seems to be emptying the structures as they are passed between the functions, any thought on how to fix it? also if anyone knows of any good examples of passing by reference, that could apply to this code that would …

Member Avatar for NathanOliver
0
147
Member Avatar for diana_pro

HI, I started to play with files in C++ and I have a little problem. Here is my c++ project and the problem: main.cpp [CODE]#include <iostream> #include "resource.h" #include <windows.h> #include <stdio.h> #include <fstream> using namespace std; int main() { HRSRC hRsrc; hRsrc = FindResource(NULL, MAKEINTRESOURCE(IDR_MYTEXTFILE), TEXTFILE); if (hRsrc == …

Member Avatar for Prosammer
0
147
Member Avatar for tedman102

I have tried to get this program to work with no luck. How do you properly use the nested selection structure? (sorry for the lack of braces, I tried getting rid of some for less confusion. Didn't think it would work but thought I might as well try :D). I'm …

Member Avatar for tedman102
0
427
Member Avatar for afi@alvi

Any ONE who can solve this problem.... "Permutations: The challenge is to find the algorithm used to create all possible permutations of a given string"

Member Avatar for arkoenig
0
104
Member Avatar for L3gacy

Hey guys I basically finished reading Beginning Visual C++ 2010 with Ivor Horton, I skipped the MFC part as I am more interested in the Win API which there's was only one third of a chapter on(not enough) and I was wondering if Programming Windows, Fifth Edition by Charles Petzold …

Member Avatar for L3gacy
0
184
Member Avatar for marcux

Hi all! After surfing the web I ended up here as I could not find a good answer! I am writing an application with c++ and gtkmm. I want to access the network card and listen on all ports for packages. As far as I have found out it is …

Member Avatar for marcux
0
368
Member Avatar for turista

I have this working code but my teacher wants really specific things. codes always have to be OOP, and this needs to to have no more then 2 cout. i have 3 but cant seem to find away to take one out. my friend told me i should do this …

Member Avatar for turista
0
267
Member Avatar for pablocremita

Hello, First of all, sorry for my english. I will try to make me understand. I'm doing a program with CodeGear C++Builder 2009 that manages a few tables. The tables were created with Database Desktop 7.0 (dbd32). Between these tables there are a table whose name is 'Evaluation'. His estructure …

Member Avatar for gusano79
0
544
Member Avatar for Stefano Mtangoo

I have been learning PHP MVC pattern and it is pretty cool. have almost finished app and I can see how mess you can make a code without good design. Now can MCV be applied to C++ apps? Where does Plugin manager/Plugins go if that is even possible?In model or …

Member Avatar for Stefano Mtangoo
0
171
Member Avatar for Peyton

Hi, I was given this class member function that overloads the == operator. I don't understand it. Please could you help me understand it? Here is the class [CODE]class Word { public: // constructor Word(const string& word); // overloads is-equal-to (or equivalence) operator - this is very useful for testing, …

Member Avatar for Peyton
0
147
Member Avatar for mattiapdo

Hi I'm new in this forum. I'm an italian student (not an expert of c++) , so I perharps will not understand very well English (escuse me); I wanted to create a program in C++ that let me to receive the translation in Morse Code of a string... Do I …

Member Avatar for Sodabread
0
2K
Member Avatar for siaswar

Hi I'm software engineering student. I know python, c, c++ and c#. It's been two years I'm trying to learn programming but somehow I still a beginner. I just know the syntax of these languages. I love Linux and open-source. I tried to learn programming in Visual Studio but my …

Member Avatar for katmai539
0
219
Member Avatar for bimoweemo

Im getting a bunch of errors from the compiler.Not sure what im doing wrong.... Header File [CODE] #include<iostream> using namespace std; #ifndef STACK_H #define STACK_H template<class stackElem, int maxSize=80> class stack { public: stack() { top=-1; } bool push(const stackElem &item); }; #include "stack.cpp" #endif [/CODE] this is the .cpp …

Member Avatar for alwaysLearning0
0
84
Member Avatar for Jsplinter

I've tested the following code in a console application, and it compiles just fine. However, when I copy it to a header to include in a larger project, I get 77 link errors, all related to boost. If I comment out the line in [COLOR="red"]red[/COLOR], everything compiles just fine without …

Member Avatar for pseudorandom21
0
444
Member Avatar for palsoft

Hello, Is there some possibility to export end game result from EA Sports game NHL 2002? I want to use it for my web cup-administration tool. I haven't any experience with C++ (what I think NHL 2002 is written in) nor any debuggers. Could you please help me or give …

0
76
Member Avatar for Kerlix

I'm using VS 2010 and I always get multiple error messages: '<<': no operator found which takes a left-hand operand of type 'std::string' (or there is no acceptable conversion). I get that for lines 36 and 52. Then I get "Intellisense: no operator "<<" matches these operands for lines 36 …

Member Avatar for Caligulaminus
0
309
Member Avatar for fsefsef23

Sorry for the confusing title. Basically I have a line which I read from a file that gets stored as an array stack of characters that reads as follows: Nn<-<-<-<-No <-w iz<-sthe<-<-<- the time. Where the top of the stack is the '.', and the bottom is the 'N' respectively. …

Member Avatar for WaltP
0
419
Member Avatar for har58

Hi, I have written a small program to calculate Fourier coefficients of square wave. [CODE] #include<iostream.h> #include<stdlib.h> int main() { int *A,*B,a,n,i,; float pi=3.14; cout<<"Enter value of amplitude"; cin>>a; cout<<"Enter which harmonic you want to display"; cin>>n; A=new int[n+1]; B=new int[n+1]; A[0]=0; for(i=0;i<=n;i++) { B[i]=0; } for(i=2;i<=n;i=i+2) { A[i]=0; } …

Member Avatar for shokichi
0
2K
Member Avatar for thecoolman5

Hi, I am trying to make a one octave piano. heres my code: [CODE]#include<windows.h> #include<mmsystem.h> #include<stdlib.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class name into a global variable */ char szClassName[ ] = "WindowsApp"; int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, …

Member Avatar for thecoolman5
0
1K
Member Avatar for nisabalish
Member Avatar for jonsca
0
59
Member Avatar for thecoolman5

hi, i am writing a program for my dad. I want it to keep the mouse in x=500 y=500 while waiting for input. So its asking for the password and if you try to move the mouse, it'll put the mouse back in x=500 and y=500 and have keep looping …

Member Avatar for pseudorandom21
0
671
Member Avatar for sergent

Is there Linux functions equivalent to Windows functions [CODE] mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); SetCursorPos(x,y); [/CODE] Specifically Ubuntu, GNOME. I tried to search on google, but did not find anything useful.

Member Avatar for L7Sqr
0
320
Member Avatar for Peter4n31

Hi, Program works fine,but memory validator reports UNINITIALIZED READ on CProfiles profile; Could you please help me with this? Here is my code: inside profiles.cpp[CODE] #include "profiles.h" CProfiles profile; // Here it reports the problem KeyProfile* keyProfile=&profile; //------------------------------------------------------------- int CProfiles::Init() { // other code [/CODE] inside profiles.h[CODE] class CProfiles: public …

Member Avatar for Peter4n31
0
143
Member Avatar for lhuynh39

i'm a total beginner and don't know how to do this: MYBANK ATM MENU FORMAT: You will be submitting the C++ code as a CPP file. The source code file should use self documenting code and additional comments (as required) to improve code readability. The source code file must contain …

Member Avatar for Sodabread
0
371
Member Avatar for rajatchak

Hi , i have decided to develop a program on typing tutor for my school project. C++ the program should be based on classes and objects. The main menu shall contain : login, create acc, help , exit login and create acc options will ask for the username and passwords. …

Member Avatar for rajatchak
0
214

The End.