Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #3K
~3K People Reached
Favorite Forums
Favorite Tags

14 Posted Topics

Member Avatar for koricha

Hi I dont think you have any problem, you've already done the job You may also overload the operator[] for const object, read only [CODE]const int& operator[] (int index)const{ if(index < size && index >=0) return storage[index]; return storage[0] ; }[/CODE] You may also overload other operator for example + …

Member Avatar for koricha
0
152
Member Avatar for Vasthor

Hi If you cant see where you have an error or a bug than go for [COLOR="Red"]debugging [/COLOR]-:) Debug your code, when you debug your code you see what your codes really do, and you see how funny error and bug you may have coded :-)

Member Avatar for mike_2000_17
0
107
Member Avatar for therockon7throw

The puzzle The original puzzle is in Java [url]http://wouter.coekaerts.be/2012/puzzle-clowns[/url], so I tried to write it in C++ and post it here for your, so that you solve it and having some thing to think:-) There almost aren’t any rules; any cheating inside your code is allowed; it is the whole …

Member Avatar for therockon7throw
0
195
Member Avatar for triumphost

Hi, I dont know which library you use, however I can say that, it is possible that the [CODE]operator[][/CODE] is not overload for Controls, or it is not an array. Secondly, when you use [CODE]new[/CODE] the left hand side must be a pointer, and not a simple variable not so …

Member Avatar for therockon7throw
0
104
Member Avatar for phorce

[QUOTE=phorce;1760953]Hello :) (Too many questions about this)! Basically, I'm trying to display the contents of a matrix without using "cout" in my class. (It's a bad method) I've tried to return an array, but, that failed miserably.. So I've got a method in my class: [code] double Matrix::read(int theRow, int …

Member Avatar for ravenous
0
118
Member Avatar for phorce

[QUOTE=subith86;1760119]Your code will compile if some changes are made in line 5, 13, 19 as shown below [CODE]#include <iostream> using namespace std; int* matrix() { int matrix[10] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; return matrix; } int main(int argc, char *argv[]) { int* …

Member Avatar for phorce
0
205
Member Avatar for bennetk2

[QUOTE=bennetk2;1742990]I can't figure out what this error is saying. Error: C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp||In function 'bool operator==(const statistic&, const statistic&)':| C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp|225|error: passing 'const statistic' as 'this' argument of 'float statistic::sum()' discards qualifiers| C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp|225|error: passing 'const statistic' as 'this' argument of 'float statistic::sum()' discards qualifiers| C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp|226|error: passing 'const statistic' as …

Member Avatar for gusano79
0
337
Member Avatar for inspire_all

[QUOTE=sukhi badhe;1751375]i am a bit confused.i am feeling that one should be expert at data structures rather than language.i am learning c++ this semester,learning oop and data structures.[COLOR="Red"]is data structures more important than language?[/COLOR]what can get u into a good company?[/QUOTE] We call C++(C PLUS PLUS ) because it has …

Member Avatar for WaltP
0
128
Member Avatar for rayden150

[QUOTE=rayden150;1612494]I am trying to make a recursive program that prints out the numbers from 1-100 without using any iterations such as loops, but every-time it just keeps printing out 5050..? [CODE] #include<stdio.h> #include<stdlib.h> int counter(int num); int sum=0; int main(){ int result, num=100; result = counter(num); printf("%d", result); system("PAUSE"); return …

Member Avatar for siaswar
0
297
Member Avatar for kspecks

[QUOTE=kspecks;1746388]So here is something I am writing just to get back into code and I can't find the flaw with it. [CODE] template<typename T> class Array { public: Array(unsigned arraySize): data(0), size(arraySize) { if(size > 0) data = new T[size]; } ~Array() { if(data) delete[] data; } void setValue(unsigned index, …

Member Avatar for VBNick
0
316
Member Avatar for madhav024

[QUOTE=madhav024;1749400]Hi iam facing the problem while compiling the below program, program.h ------------headerfile typedef struct { unsigned char c ; unsigned int i ; unsigned long l ; }data_t ; program.cc ------c++ file # include <iostream> # include <malloc.h> using namespace std ; # include "ptr.h" int main() { data_t data[] …

Member Avatar for therockon7throw
0
267
Member Avatar for Karlwakim

[QUOTE=Karlwakim;1749382]Hi everybody, I need you to answer these questions please. 1- How did you learn c++ : a-books b-videos c-in school or university d- other : 2- How did you feel when learning : a- Bored b- Interested c- other : 3- Was it the first language you learn ? …

Member Avatar for therockon7throw
0
238
Member Avatar for IanKent

[QUOTE=IanKent;1749514]Ok. First off, here is the question I am answering Problem 3: Write a program that will read monthly sales into a dynamically allocated array. The program will input the size of the array from the user. It will call a function that will find the yearly sum (the sum …

Member Avatar for therockon7throw
0
348
Member Avatar for ErikaShanks

[QUOTE=ErikaShanks;1754830]I have to write a program that should read test scores students received on the first quiz into an array. Assume that up to 30 students could be entered. Input will stop when the sentinel value -1 is entered. Write functions to: 1. Read the original scores into arrays 2. …

Member Avatar for therockon7throw
0
108