49,761 Topics
| |
Hi.. I am trying doing this exercise.Which is require a program that could ask the user how many integer he/she want to enter,and allow him/her entering them thus lastly display them all back. i could just simply doing it by using an array,but this time i wanna use a vector … | |
I am using the library of boost to create a 2D dimensions array and compare about their speed There are three kinds of array, matrix of boost, multi_array of boost and the raw array Below is my code: [code] #ifndef TESTRELMAT_H #define TESTRELMAT_H #define BOOST_NO_EXCEPTIONS #define BOOST_DISABLE_ASSERTS #include <boost/numeric/ublas/matrix.hpp> #include … | |
I started learning Winsock (2.2) programming in university recently and when writing my first program (fileserver and its client) a few questions came to mind. Let`s assume my fileserver is continuously listening for client connections and when one occurs it establishes connection, does whatever client wants (such things as list … | |
hi every one im working with some exersies which include inheretence every thing is fine except that the compiler dose not recognize the base clase it says Error [COLOR="Red"] Cannot open include file: 'pointType.h': No such file or directory[/COLOR] here is part of the code [CODE] # include "pointType.h" # … | |
alright, I'm a bit stuck here, I've tried a few things but I can't figure it out. Question is in the source: [code=c++] // test.h namespace test { class foo { static void test(); }; } [/code] [code=c++] // test.cpp #include "test.h" namespace test { // how can I define … | |
like the thread title said i need the best C book for never programmed person can you please tell me it thanks.... | |
The book Im using. Pg 108 - 124 Objects Abstraction, Data Structures and Design using C++ Author: Elliot Koffman and Paul Wolfgang I have a problem with this code. All of these errors are occurring in the Phone_Directory.cpp. It is in, getline, << , out. .......functions... I tried getting these … | |
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 … | |
#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(); } } | |
// 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 … | |
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> … | |
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 … | |
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 … | |
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[]) … | |
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 … | |
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. … | |
How do I call/reference a Vc++ dll from a c# windows form application? Abhishek | |
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; … | |
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 … | |
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 … | |
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.. | |
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. … | |
Why doesn't [code] typedef [I]ClassName[/I] SomeName[[I]SomeSize[/I]][[I]SomeOtherSize[/I]];[/code] work? | |
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 = … | |
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 … | |
#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 … | |
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 … | |
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 … | |
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 … |
The End.