49,761 Topics

Member Avatar for
Member Avatar for bnekolny

Hello, So I've got a code where I'm wanting to make sure that there is nothing in this class variable "finalgrid". To do this I've got an if statement: [code]if(canvas->finalgrid) OR if(finalgrid)[/code] Sorry for the confusion with the two statements, but I'm working on modifying one project to fit in …

Member Avatar for bnekolny
0
104
Member Avatar for nanchuangyeyu

Hi, I am a C++ newbie and had never written even a very simple C++ class before. Now I intend to do such a job. My objective is quite simple, a matrix class with the following features is just OK: [COLOR="Red"]1. The object of such a class can be initialized …

Member Avatar for Ancient Dragon
0
387
Member Avatar for ladykaelin

Hi: How can I write a program using pointers and classes. My program suppose to translate dollar amounts in the range 0 through 9999 into an English description of the number. For example, the number 710 could be translated into the string seven hundred thirteen, and 8203 would be translated …

Member Avatar for monkey_king
0
111
Member Avatar for b89smith

I have a few computers one acts as a server and the rest are clients. They are all on the same LAN. I need to write a program that when I enter data into one of the clients it sends it back to the server which is constantly listening. The …

Member Avatar for b89smith
0
95
Member Avatar for adelphe
Member Avatar for adelphe
0
93
Member Avatar for headedtomexico

i'm a little back wards with my c++ knowledge. I kinda got thrown into a maintenance project on an existing project so I know how most of the software works, but I find myself lost on some simple entry level things sometimes. That was my disclaimer for not feeling foolish …

Member Avatar for Hiroshe
0
154
Member Avatar for GWalk612

I am getting the error "error C2228: left of '.push' must have class/struct/union" when I try to push a random double onto the stack. Here's my driver... [CODE]#include <iostream> #include <string> #include <stdio.h> #include <stdlib.h> #include <time.h> #include "DynStack.h" using namespace std; int main() { double dblCatch; //holds values popped …

Member Avatar for Tom Gunn
0
119
Member Avatar for drake2212

So this is my first time on here asking for help but I do visit this forum every now and again when I am taking a programming class. I am trying to get my doubly linked list to work correctly. Also I am having issues with parsing an input file. …

Member Avatar for drake2212
0
107
Member Avatar for dchunt

Is it possible to create a series like this char j; int ,k; for(int i=0;i<10;i++){ k=ji; } I get an error but want to create something like j0 j1 j2 and so on... How do i do that ?

Member Avatar for onaclov2000
0
93
Member Avatar for daviddoria

The problem is on the "MyIter = " line: [code] class OrientedPoint { .... class variables ... std::map<std::string, double> DoubleValues; ..... bool OrientedPoint::getDoubleValue(const std::string &ValueName, double &Value) const { std::map<std::string, double>::iterator MyIter; MyIter = DoubleValues.find(ValueName); [/code] The error produced is: [code] In member function 'bool OrientedPoint::getDoubleValue(const std::string&, double&) const': error: …

Member Avatar for daviddoria
0
6K
Member Avatar for daviddoria

Is there a way (without overloading) to call a function like this [code=cplusplus] GetValue("one"); //AND std::string test("one"); GetValue(test); [/code] The function is simply: [code=cplusplus] int GetValue(const std::string &MyString) { return MyMap[MyString]; } [/code] This overload does the job: [code=cplusplus] int GetValue(const char* MyString) { return MyMap[MyString]; } [/code] But that …

Member Avatar for daviddoria
0
111
Member Avatar for zeus1216gw

I'm trying to get a GCD of 2 numbers. which I can do and it works fine. however I want to return one of the values based on the function I wrote. however it returns both. I know why because I wrote it that way just to get something down. …

Member Avatar for zeus1216gw
0
110
Member Avatar for khotso

at school,I was given the class aName and asked to overload the input operator.the class has declared surname as type of char* and the surname is input from the keyboard and it must not be empty.please help me with the code.the class has declared the operator as its friend

Member Avatar for Ancient Dragon
0
85
Member Avatar for moshe12007
Member Avatar for jencas
0
241
Member Avatar for pbt

I have to do project on the c++ in dev c++ using gcc compiler for windows version. But, i am unknown to windows programming since, i have done project on 16 bit environment using turbo c. Due to many projects on php and other class assignments and lab reports. Therefore, …

Member Avatar for pspwxp fan
0
109
Member Avatar for tomtetlaw

I am trying to initialize a vector inside a class's constructor, and I want the vector to be of type 'this' [code]std::vector<this>[/code] didnt work, [code] void* type = this; std::vector<type> [/code] that didn't work either, is there any other way to do it?

Member Avatar for jencas
0
229
Member Avatar for Kadence

I have LAPACK and am having problems trying to compile while linking to it with g++ (MinGW and MinGW 64, have and tried both) using the following command: [CODE]g++ main.cpp -I"C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64" -L"C:\Program Files (x86)\University Of Tennessee\LAPACK 3.1.1\lib\x64" -llapack -lblas[/CODE] Even though I'm adding the include …

0
58
Member Avatar for nustian

dear all plz i want help in this program can anyone do it...... Question: Derive a class from long_int class and add a member function "multiply" in the derived class to multiply two long_ints using the add member function already defined. multiply should work like this 2*3 = 2+2+2 (adding …

Member Avatar for nustian
0
82
Member Avatar for npd_ddit

main() { float a=0.7; if(a<0.7) cout<<"true" ;else cout<<"false"; } problem---> it prints true ..... when 0.7 is replaced everywhere with 0.8 it displays false again with 0.9 , it displays true.. typically only for 0.7 and 0.9 it gives different answer ,then the conventional logical answer..why so??

Member Avatar for npd_ddit
0
120
Member Avatar for Cloneminds

I need to make a program which uses 3 parallel numeric arrays, references each other, then displays the price and quantity of the supplied product id. It gives me an error message on line 36 about my != searchforID, can anyone enlighten me as to why? [code=C++] //Ch11AppE12.cpp //Displays the …

Member Avatar for Cloneminds
0
229
Member Avatar for Haimanti

hi i have retrieved data on data grid from backend. i want to write a code with which i will be able to retrieve the complete data related to the editable field from backend to front end. The edit and delete button needs to be seen on the right click …

0
62
Member Avatar for apease11

I can't seem to get [ICODE]ofstream[/ICODE] to use a [ICODE]dynamic name[/ICODE]. It's been bugging me for almost 12 hours now and figured I'd ask it. I have searched the forums and I am doing everything other people have done to make it work for them. Here is my code, the …

Member Avatar for apease11
0
96
Member Avatar for NathanOliver

hi narue i would like to ask if this method should be called after ever cin statement? the reason i ask this is that if i write a program and i have 2 [icode] cin >> text; [/icode] statements then at the end before my [icode] return 0; [/icode] i …

Member Avatar for NathanOliver
0
125
Member Avatar for javaAddict

Hi all, I am having problem with openCV: I am using Microsoft Studio 2008 From this lnk: [URL="http://sourceforge.net/projects/opencvlibrary/"]http://sourceforge.net/projects/opencvlibrary/[/URL] I downloaded the [U]OpenCV_1.1pre1a.exe[/U] for windows and installed it. I have been searching ways to include the libraries installed but the instructions don't seem to match my VS version? So after creating …

Member Avatar for h.sileem
0
441
Member Avatar for beset123

[code=cplusplus] #include<iostream> using std::cout; using std::cin; using std::endl; #include<conio.h> class Mouse { public: void move(); void turn(); }; void Mouse::move() { char ch; int length; int width; switch (ch) { case '1': cout<<"To move forward"; for(int y;y==length;y--) break; case'2': for(int x;x<width;x++) break; case'3': for(int x;x>0;x--) break; } } void Mouse::turn() …

Member Avatar for Ancient Dragon
0
171
Member Avatar for headedtomexico

So I've got a server host that runs my MySQL 5.1 db. I have a stored procedure in it, its similar to [ICODE]CREATE PROCEDURE CountUsersByFirstName(IN SearchName TEXT, OUT Count INT) BEGIN SELECT COUNT(*) INTO Count FROM Users WHERE Name = SearchName; END[/ICODE] the syntax of that may be off as …

Member Avatar for headedtomexico
0
369
Member Avatar for OwenRoberts

Hello again. I am wanting to make a program that handles complex numbers. I have created a class that represents a complex number and called it, ComplexNum. I have tried to create a second class that is the calculator and takes two ComplexNum objects as input and returns a third …

Member Avatar for ShawnCplus
0
107
Member Avatar for ninjaneer

background: I am currently working on a project that will require me to grab some audio from an electronic stethoscope and process it for use within a larger program -- I've been looking into ways to do this and ran into a post on MSDN that was talking about [QUOTE]"taking …

0
104
Member Avatar for PC_Nerd

Hi guys. I'm aware of the requirement to specify std:: as the namespace for string in some way ( whether it be using namespace std etc) - but the following error has stumped me as to its cause. [CODE] $ g++ Conf.cpp Conf.cpp:33: error: ‘string’ in namespace ‘std’ does not …

Member Avatar for StuXYZ
0
6K
Member Avatar for DeanoJ

I need a firm answer on what OS, Linux, Unix, ect.. and software development code which will actually work in 64bit, mainly using the unlimited addressing capabilities. Now there are a LOT of claims out there and I've tried a few languages, although higher level, but ultimately run shot. My …

Member Avatar for Hiroshe
0
128

The End.