Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #1K
~33.9K People Reached
About Me

Programmer a long time ago, getting back into it now.

PC Specs
Platform: Mac mini running OS X, using Qt as my IDE and C++ as my primary programming language.
Favorite Forums
Favorite Tags
Member Avatar for mzimmers

Hi, all - I'm relatively new to iterators, and to template functions, so I suppose it was inevitable that the first time I tried to combine them, I'd run into a problem. Here's the function: [CODE]template <class T> int getVectort(ifstream & s, long nbrCells, typename vector<T>::iterator iter) { int rc …

Member Avatar for mzimmers
0
610
Member Avatar for Vasthor

what I mean by undefined error is because I don't know what the error is about. :P, actually it's because the error not from the code itself, but it's about a compiler that can't defined some sort of file... btw, as title said, the error is from the code in …

Member Avatar for gusano79
0
219
Member Avatar for Taino

What I need to do is... make the output continuous. For example when I input a number it displays character it represents in the current message line. What I need is for each input to add to the next line. In other words when I input 39 I get G …

Member Avatar for mzimmers
0
127
Member Avatar for pingpongplaya

I have this assignment for adding two polynomials using operator overloading. I am new to C++ and am having trouble putting the pieces together for the operator overloading portion of the code. I understand how to add two poylnomials together, I just don't know where to begin to put down …

Member Avatar for pingpongplaya
0
4K
Member Avatar for alishanvr

[CODE] // Node .h #ifndef NODE_H_INCLUDED #define NODE_H_INCLUDED # include <iostream> using namespace std ; class Node { private: int object ; Node *nextNode ; public: Node() ; void setObject(int x) ; void setNext(Node *next) ; int getObject() ; Node *getNext() ; } ; #endif // NODE_H_INCLUDED //----------------------------------------------------- // Node.cpp …

Member Avatar for alishanvr
0
2K
Member Avatar for happikoto

Though I would be able to figure this out but for some reason my if statements are just not working. What I'm trying to do is date validation. I call this function passing in day, month, year. The issue I'm having the the if statement. I can't seem to get …

Member Avatar for WaltP
0
192
Member Avatar for jefgreen

[CODE] #include <cstdlib> #include <iostream> #include <string> using namespace std; bool checkleap(int year); int main(int argc, char *argv[]) {string s1; int year,month,day,inbetween,dayspassed; char dash1,dash2; s1="Today is day number: "; bool leapcheck; leapcheck=checkleap(year); cout<<"Enter a date, in the form of MM-DD-YYYY: "<<endl; cin>>month>>dash1>>day>>dash2>>year; switch (month) {case 1: 31-day=inbetween; [COLOR="green"]//Line 19[/COLOR] 31-inbetween=dayspassed; …

Member Avatar for mzimmers
0
179
Member Avatar for jess64k

I'm trying to figure out where a proper place to put a comparison counter to count the number of 'comparisons' made in a quick sort is. This is my code so far, I have one counter where I think it should go, but I'm not sure if it should place …

Member Avatar for mzimmers
0
7K
Member Avatar for spar

â–ºWrite a class implementation for a class Student that contains the data members: 1. Data member for the student Name. 2. Data member for the student Number (ID). 3. Data member for the student Faculty. 4. Data member for the student Gender (M or F). 5. Data member for the …

Member Avatar for XMasterrrr
0
225
Member Avatar for optimumph

I'm trying to sort an array of numbers in ascending order and don't know whats wrong with my code (I'm completely new to vectors). I should first copy the input array (data) into an STL vector, then apply STL’s sorting algorithm to the vector, and finally copy the vector back …

Member Avatar for mzimmers
0
216
Member Avatar for Jsplinter

[CODE] vector<int> iv; iv.push_back(4); vector<int>::iterator it = iv.begin(); cout << *it; cout << *(iv.begin()); //debug assertion here [/CODE] Why can't I dereference iv.begin() directly?

Member Avatar for Jsplinter
0
273
Member Avatar for ladybug21

//I have this running but when the user inputs a different character than the program just out puts the error //message and that its. I want it to go back and ask the user if they would like to run the program again. Any //ideas? Thank you! [CODE]int main () …

Member Avatar for mzimmers
0
263
Member Avatar for express690

I'm having trouble writing an array program that deletes duplicate numbers in an array. I can't figure out the code for find the array size. I have the array max set to 25 but my array doesn't have 25 numbers in it. (let's say it only has 10 numbers in …

Member Avatar for WaltP
0
252
Member Avatar for triumphost

Hey guys I'm here again with another problem. I want to search in a string for a string with quotes in it. Example: [CODE]String to search = {' </a></div></div></div><div class="clearfix"><table cellspacing="0" class="wsod_quoteData"><tr><td class="wsod_last wsod_lastIndex" nowrap="nowrap" '} What to search for = {' <table cellspacing="0" class="wsod_quoteData"> '} Then if found, from …

Member Avatar for triumphost
0
166
Member Avatar for crownedzero

Using strings [CODE] #include <iostream> #include <string> using namespace std; string replaceSubstring(string, string, string); int main() { string string1 = "the dog jumped over the fence", string2 = "the", string3 = "that", newString; cout << "This program will replace a keyword in a sentence with another word.\n\n\n"; cout << "Our …

Member Avatar for mzimmers
0
2K
Member Avatar for Firzin

So I have question regarding a program I need to write. I need to read a text file which consists of a location and the coordinates of it's longitude and latitude. The program should be able to read any amount of spaces and tabs in between the tokens. So it …

Member Avatar for mzimmers
0
180
Member Avatar for alarifth

Hi everyone! When i compile my small piece of code it gives me the error [COLOR="Red"]C2512 : No appropriate default constructor available[/COLOR] this is my definition of class person: [CODE] // Person.h // A class defining a person #pragma once #include <iostream> #include <string> #include <functional> using std::cout; using std::endl; …

Member Avatar for mzimmers
0
9K
Member Avatar for Kyle Willett

In my cs2 class the assignment is to implement a sparse matrix with pointers without using a 2d array. Here is the exact text: A sparse matrix can be represented using an array of pointers called "arrayOfPointer" and an array of integer called "matrixInfo". The size of "arrayOfPointer" will be …

Member Avatar for Kyle Willett
0
519
Member Avatar for David321

I have two quick questions: 1) What is the point of a static method? As far as I can tell, there is no data there that would be accessed by multiple objects as there is no data stored there at all... 2)What does it mean to have a const after …

Member Avatar for mike_2000_17
0
156
Member Avatar for jenbrandau341

Here is my project: Write a program that dynamically allocates an array large enough to hold a user defined number of structures (string name and three double tests). Using a function, the user will enter a name and 3 test scores for each element in the array. Using another function, …

Member Avatar for WaltP
0
229
Member Avatar for jonnyboy12

Hello. I have a game with code like this. [CODE] class manualSetPosition{ public: Ogre::ManualObject * manualDebugger; void SetPosition( Ogre::ManualObject * manual, Ogre::Vector3 mousepos ){ manual->position(mousepos); }; }; [/CODE] Thats a class I use to draw a grid. I build it like this in my project. [CODE] manualSetPosition ManualSetPosition[1226]; [/CODE]this works …

Member Avatar for nickcampau
0
133
Member Avatar for skylinedrifter

Hey1 fox so last weekend my friend asked if i could help her on her Comp Sci project, Little did she know im not a programming genius. So i've come to the one and only Daniweb for help... here's what she's supposed to do.. Write a C++ program by completing …

Member Avatar for frogboy77
0
108
Member Avatar for fanfunstar

Anyone can help me with this algorithm? 1 set up stack in and print it 2 while stack in is not empty repeat 2.1 max = in.pop 2.2 while there are still element in stack in repeat 2.2.1 value = in.pop 2.2.2 if value > max 2.2.2.1 temp.push(max) 2.2.2.2 max …

Member Avatar for raptr_dflo
0
2K
Member Avatar for george08.08

Hello again I am a bit confused about how to show a constant in a class constructor. I have a savings account class (A child class of Account) which has a constant interest rate. I have it in my class as a static constant double INTEREST_RATE;. Then outside of my …

Member Avatar for mzimmers
0
172
Member Avatar for george08.08

Hello I am creating a bank account for an assignment and the account number must be automatically generated with consecutive numbers. I have written some code that works, but now I need to know how to use it in conjunction with my Account class, especially how to add it to …

Member Avatar for mzimmers
0
201
Member Avatar for tvm78

So I'm trying to write a program that is due tomorrow. I am trying to overload operators and dealing with template classes. I have everything written already but keep getting this error whenever i try to compile the driver file: NOTE: proj4.cpp has #include "box.h" and box.h compiles fine, but …

Member Avatar for NathanOliver
0
269
Member Avatar for rjstamey

Hello all, I am trying to figure out how to create new class objects when the user is asked if he/she would like to. What I have is a program we have to write that takes a certain number of students and keeps track of their name, assignments, and the …

Member Avatar for xfbs
0
457
Member Avatar for mikepablo

For my intro to c++ class I have to create a complete program from broken algorithms The questions are (a) Print a random number between -1 and -9 to the output screen: (b) Print (to the output screen) the sum of the square roots of the numbers 1, 2, 3 …

Member Avatar for ag_17
0
211
Member Avatar for v3ga

Hi everyone just started Daniweb! I have been using devcpp for some time.I am trying to make a switch from DevCpp to Visual Studio but find the latter confusing having so many options. Recently, I did a console application that will accept a word from user and prints its anagrams. …

Member Avatar for v3ga
0
256
Member Avatar for Zssffssz

Ok this comes as two questions: what is the best variable for storing bianary data and how would I send That through a XOR gate? When I searched it didn't really do anything because XOR is a binary operator. I remember how to open o file in binary form from …

Member Avatar for mzimmers
0
117