49,756 Topics

Member Avatar for
Member Avatar for DonutsnCode

Hi friends, I'm learning to program in C++. I'm using Notepad++ to author my code and Cygwin g++ to compile it. [QUOTE]main.cpp : in function 'int main() : main.cpp : 38 : error: no match for 'operator << ' then a lot of jibberish and number of errors : 1 …

Member Avatar for DonutsnCode
0
137
Member Avatar for itpipx

#include<iostream.h> class Exforsys(); { private: int a; public: Exforsys() {} Exforsys(int w) { a=w; } Exforsys(Exforsys& e) { a=e.a; cout<<"Example of Copy Constructor"; } void result() { cout<<a; } void main() { Exforsys e1(50); Exforsys e3(e1); cout<<"\ne3="; e3.result(); } }

Member Avatar for itpipx
-1
133
Member Avatar for ashtonpearson

// Ashton Pearson, 558771747 // // This program reads an integer and determines whether // or not it is a perfect integer. #include <iostream> using namespace std; int main() { int x; int iCount = 1; int sum = 0; cout << "Enter an integer to test (< 2 to …

Member Avatar for ashtonpearson
0
72
Member Avatar for banks2140

I need help with my C++ homework and im stuck. The problem is to write a program that reads a file of all lowercase and output each letter and how many times each letter occurs.... Here is the code i have and where i am stuck.... #include <iostream> #include <string> …

Member Avatar for Fbody
0
104
Member Avatar for harpay

This is my code for my program, it seems to work fine but the problem is i think roll has to be a char in order for q to quit to work when i implement the code in there. but when i use char, when i input the number i …

Member Avatar for emilo35
0
260
Member Avatar for Centz

I need to make a program that asks the user for their name and PIN number, then have it check the accounts file and see if that user is in there. If it finds a match it will output the users account balance. I have the text file set up …

Member Avatar for acerious
0
251
Member Avatar for YingKang

The main function looks so messy. I am wondering if there is a way I can move some of the code from the main function to Student.cpp. Could anybody help please? Thanks. [CODE] //main #include <cstdlib> #include <iostream> #include <iomanip> #include "Student.h" using namespace std; int main(int argc, char *argv[]) …

0
66
Member Avatar for gretty

Hello I have this task below & I need someone to tell me if I have done it correctly. The part where I am not sure is if I am correctly checking if the array is empty. [quote]Write a function to find the maximum value in an array of ints …

Member Avatar for Akill10
0
151
Member Avatar for martin_anastaso

Hello all, I have encountered a very bizzare (at least for me) problem when writing the output from my program to a file. I've written a program to solve numerically mean-reverting SDEs. The program takes some parameters and returns several dynamic arrays corresponding to the number of SDEs I have. …

Member Avatar for martin_anastaso
0
1K
Member Avatar for abhishekrs
Member Avatar for a-hall

I have setup an array and i have calculated the sum of my array. Now i need to find standard deviation of the numbers entered in my array. here is my code [CODE]#include <iostream> using namespace std; int main() { int i=0, count, maxSize = 36; double arr[36]; double number; …

Member Avatar for Fbody
0
141
Member Avatar for sanjuanair
Member Avatar for Narue
0
123
Member Avatar for glenak

Hi, So I've been having problems with my Eclipse C++ IDE. In other words, I haven't been able to run anything, not even a hello world program. I think the problem has to do with the fact that I don't have a c++ complier in my system. I use Windows …

Member Avatar for glenak
0
150
Member Avatar for hq1

Hi I'm tryingt to write this program: Write an interactive computer program that will find the greatest common divisor of two integers using Euclid's Algorithm. The program should be independent of the order in which the two numbers are input. EUCLID'S ALGORITHM Divide the smaller number into the larger. If …

Member Avatar for Unimportant
0
111
Member Avatar for Beancounter5

Hello, does anyone know where i can find some good examples on the list::erase() command. Specifically when erasing elements of a list whilst looping through it with for..next ,etc..

Member Avatar for Ancient Dragon
0
111
Member Avatar for eme21

Could anyone help me..... My instructor give me an assignment and i don't know how to start and i should submit it in nextweek so can you think with me and help me to know way????? this the Question--> Consider the following description an account in a bank management system. …

Member Avatar for eme21
0
174
Member Avatar for #include<>

Why doesn't [code] typedef [I]ClassName[/I] SomeName[[I]SomeSize[/I]][[I]SomeOtherSize[/I]];[/code] work?

Member Avatar for mrnutty
0
106
Member Avatar for mitrious

I'm trying to use the tolower function from the cctype header ... in this function (to check if a word is a palindrome [code=c] int palindrome(const string& w) { typedef string::size_type sz; string ret = w; sz r = 0; sz l = w.size() - 1 ; int check = …

Member Avatar for Narue
0
131
Member Avatar for sterlingf5890

I wrote out a palindrome test program for my c++ class. It is to include 3 functions (one to count the length of the string, one to test if it is a palindrome, and one to output whether the string is a palindrome or not using a switch statement). Visual …

Member Avatar for Unimportant
0
135
Member Avatar for Mabalo

#include <iostream> #include <time.h> #include <stdlib.h> #include "/home/theodore/lotto" using namespace std; main () { srand(time(0)); int One, Two, Three, Four, Five; One = rand() % 35 + 1; Two = rand() % 35 + 1; Three = rand() % 35 + 1; Four = rand() % 35 + 1; Five …

Member Avatar for Unimportant
0
114
Member Avatar for iluwinter

Hello, I'm fairly new to C++, and I am currently doing a CS assignment, which is to create a hangman game. The only problem i'm having so far is that i'm getting an error when i try to pass a char array to a function (invalid conversion from 'char*' to …

Member Avatar for vidit_X
0
145
Member Avatar for pandaEater

I'm trying to make a binary search tree without using recursion anywhere. I'm having trouble with the destructor though. I've been thinking about using a stack to help me keep track of the nodes but I'm not sure exactly how I would implement that. Any ideas? Relevant code: [CODE] class …

Member Avatar for pandaEater
0
2K
Member Avatar for sonsofliberty84

I found Ancient Dragon's code snippet for reading the files in a folder. I modified it a little because I want it to display what those files are. The problem is, it also displays the two parent directories, '.' and '..'. I was wondering if there was a way to …

Member Avatar for sonsofliberty84
0
96
Member Avatar for +_+man

Hi Everyone i want help making a Library Management Software So I can Make Command line and i need help for making it in Visual C++ Because i am new to Visual C++ Regards +_+ man

Member Avatar for Ancient Dragon
0
138
Member Avatar for subkin13

Hello, I need a way to get a function return type during preprocessing or compilation(meta...). [U]example:[/U] [CODE]int f() { MACRO_OR_META_WHICH_RETRIEVES_FUNCTION_RETURN_TYPE[/CODE] Thanks, Leonid

Member Avatar for subkin13
0
194
Member Avatar for moonL!ght

hi,im seeking for some help i want the member of my class to be of type string.. so, some of my member function to return a string but an error is keeping occuring .. iv tried to include the string heder file in the class heder file. it says missing …

Member Avatar for moonL!ght
0
124
Member Avatar for invisi

What does int* resizeArray do that int resizeArray doesn't, what' the deference? And why do I delete nArray, and not newArray? [CODE]#include <iostream> using namespace std; void printArray(int* nArray,int size) { // code printing array } int* resizeArray(int* nArray, int oldsize, int newsize ) { int* newArray = new int[newsize]; …

Member Avatar for Greywolf333
0
111
Member Avatar for dineshcbe

I don't know how to insert a string into a listbox.I hava added a extended style as gridlines for listbox.

Member Avatar for ganesh_IT
0
56
Member Avatar for ekailan

is three a way to mesure the amount of memory required during the execution of a C++ program , I am using visual studio 2008. Thanks

Member Avatar for Unimportant
0
235
Member Avatar for dorien

Hi, I have just installed CPLEX, and this has installed correctly. It put it's header files under: /home/dorien/ILOG/..../include/ Now I am trying to compile an example, which has: [CODE]#include <ilcplex/ilocplex.h>[/CODE] but I got: [CODE]/home/dorien/C++/cplex-build-desktop/../cplex/main.cpp:35: error: ilcplex/ilocplex.h: No such file or directory[/CODE] First thing I did was lose the .h... to …

Member Avatar for dorien
0
450

The End.