49,761 Topics
| |
I ran into this particular problem at work and found it quite interesting. While implementing a multi-level image threshholding algorithm, I discovered that I needed to find all the ways I could partition a range of integers into some number of consecutive groups. I like my solution, but there may … | |
C++ please help me Ten new employees are recently hired by the XYZ Company. You are asked to write a complete C++ program that will read in the information about each employee and allow them to change their passwords. Your program will be called yournameandsurname.cpp and will simply do the … | |
It will compile, and run for a split second- but then it quits itself. I've had three people look at it, but no one can see the problem. [CODE]#include<iostream> #include<conio.h> #include<iomanip> using namespace std; void getRaise(double pay[], int size) { for(int x=0; x <size, ++x;) pay[x] *=1.05; } int main … | |
hey guys, I'm using eclipse C++ and the minGW compiler. I am trying to write a header file, and in my src folder, I have HelloWorld.cpp, and HelloHeader.h I'm getting "file or directory not found when I add: [ICODE]#include<HelloHeader.h>[/ICODE] could anyone help me out? Cheers PO | |
Hi, can some one please have a look at my code for the user to enter integers and display it back to him. For some reason my program can not accept more than 8 integers? I wrote this program for a class assighnment where we where suppose to ask the … | |
I am modifying some code that spawns a thread and runs a class function. The original function was defined in ClassB as void ClassB::function(void). I now need to pass it a boolean value. I am done lots of research but I am just confused. Here is some psuedo code of … | |
Hello--- I've written a class where I would like to overload the equal sign (= sign) operator so that I can return a double during an assignment. The following code snippet shows what I would like to do, but for some strange (probably small) reason, it does not seem to … | |
am trying to get uniqueID in the following segment of code to count how many times the if statement gets used, but all i get is a list of 1's. Any ideas?? [CODE]if (is_tri == true) { //add the triangle to the list unsigned int uniqueID = 0; uniqueID++; cout<< … | |
Hi, i can't seem to be able to fix this loop ! :( I have tried to use cin.clear() but it still does not work. It goes in an infinite loop. Any ideas? Thanks in advance! [code] #include <iostream> #include <cstring> #include <string> using namespace std; int main() { char … | |
How to connect c++ and oracle ? i am working on a project Multiplex management system using c++.... but it really tedious task to store and handle all data in file... please help me with the procedure...!! | |
Problem Statement: Finding the repeated elements in an array You are required to write a program that takes 10 integer values in an array as input from user. After getting input, the program should find the elements with repetition and number of times each element is repeated. Detailed Description: 1. … | |
Hi. i 'm learning C++...Now i need some help for my code because i get this error [code=text]error LNK2019: unresolved external symbol "public: __thiscall Parkedcar::Parkedcar(void)" (??0Parkedcar@@QAE@XZ) referenced in function _wmain 1>C:\Users\jackkwok\Documents\Visual Studio 2005\Projects\KwokParking\Debug\KwokParking.exe : fatal error LNK1120: 1 unresolved externals[/code] Please let me know how to fix this problem. thanks … | |
[CODE]#include<iostream.h> #include<conio.h> class citizen { private: const char name[25]; char nationality[25]; public: citizen() //first constructor with no parameter { name="Farhan"; nationality="PAkistani"; } citizen(char a, char b)//second constructor { name=a; nationality=b; } ~citizen() // destructor { cout<<"\n Destructor called"; } void display() { cout<<name; cout<<"\n"<<nationality; } }; void main() { clrscr(); … | |
anyone know a method to find remains of programs in the registry that were not uninstalled corectly ? | |
Hello, I am currently trying to implement A* search, and I am pushing all of the costs to travel from one node to the next via priority queue. The only problem I am running into is that when I use the pop() feature, I am getting back the highest node … | |
I've stumbled accross a curious problem. It happens that if I declare two int variables before SDL_Init, the functions to make a button appear and move do not work. However, if I put them after they do work. It is strange because the functions accion and mostrar do not use … | |
I am trying to develop a function in a linked list that outputs in a specific manner however I am getting compile errors. Tis is the code: listelement.h [CODE]virtual void out(ofstream& myfile) = 0;[/CODE] list.h includes listelement.h [CODE]void OutList(ofstream& myfile);[/CODE] list.cc includes list.h [CODE]void List::OutList(ofstream &myfile){ ofstream file; file.open("tris.dat"); if(myfile.is_open()){ … | |
Hi it's my first post here! I've got a question using active x in vc++. What i have done yet: i successfully imported a active x dll and created an object of the class in the dll. so everything works fine. now my problem is that i have a exe … | |
I'm having a bit of a problem with a two dimensional array of characters. The idea is that the program copies a bit of text using strcpy, and it's supposed to place it in the first line of that array. Where abouts in that line is determined by the length … | |
hi fellas, here is my prob: im using microsoft visual C++ 2010 Express edition, which is a trial one...i've been googling this tutorial since last 3 week. But no result i found. I hope somebody can help me.....for ur info, im a beginner in programming world...huhu any good advise...??:) | |
Hi all, I want to know if there are any C++ libraries which allow me to make JAX WS calls for a web service to a server. (Mainly the SOAP message part - the serialization and de-serialization of SOAP message) Thanks, Harsha | |
just want to ask if this is an array program????... my professor told us to make array program that displays 10 names.. my professor tells us that we can use C or C++ program.. i prefer using C cause im much familiar with C programs... Output: fdgdfg dfgdfg dfgdfg dfgdfg … | |
Hi, I have a requirement to parse the Excel sheet . Which is the best programming language to implement this task ? I know only c/c++ programming. Can anyone provide me the tutorials ? Thanks in Advance , Narendra | |
Ok so today I tried translating the ever confusing pseudo codes that our books give us and this happened. First of all, queues and lists are built in functions in the c++ library right? I have a bunch of compiler errors that wont go away. Queue undeclared, list undeclared, ifstream … | |
Okay, here's the deal. I haven't tried to compile my code yet, because it's just a class library that I'm creating so far - nothing needed to be ran. Anyways, here's my code: [CODE=c++]const std::vector<Item*>& Inventory::setItems(const Item* itms, crUINT numOfItms) { _itms.clear(); for (UINT i = 0; i < numOfItms; … | |
I get an error when I try compiling with #include <cmath>, yes, I've tried with -lm, still does not work. Compiler: MinGW Compile.bat: [CODE]@echo off echo Compiling... g++.exe main.cpp -o "Distance.exe" -lm pause [/CODE] cmath IS in MinGw include folder. C:\MinGW\include\c++\3.4.5\cmath Any ideas? | |
Hi, I've been working on this a few days and I'm kinda stuck. my error is in line 38- average =ave(&ParentsAge,sizeof(ParentsAge)); If anyone has any ideas as to what I am doing wrong, I would love to finally figure this out!! Thanks #include <iostream> using namespace std; void displayTitle () … | |
For some strange reason, my game's score counter is not working correctly. I threw in an enemy, which just walks back and forth between two blocks in the map. I know I probably didn't program the enemy the smartest way, and I'm probably about to change it. Instead of programming … | |
So I'm trying to loop and read in values from my csv while there are values to be read. What do I use for the while condition? I tried all manner of things..... [CODE] void load() {//read from file ifstream inFile("csv.txt"); string line; if(inFile.is_open()) { } else { cout << … | |
What I'm trying to accomplish is for the program to ask the user for their username and password and display it to the screen like this "John, abc123" after the function passwordCheck has confirmed that the password is not less then 5 characters. If the password is less then 5 … |
The End.