49,761 Topics

Member Avatar for
Member Avatar for Duki

Hey guys, I'm trying to run this code [code=c++] // Copyright (C) 2001-2003 // William E. Kempf // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/thread/thread.hpp> #include <iostream> void helloworld() { std::cout << "Hello World!" << std::endl; } …

Member Avatar for Duki
0
144
Member Avatar for Jsplinter

I am trying to write an if statement to test whether two conditions are both true. However, my code does not work when I combine the both tests into one if statement like: [CODE] if((last_smallest < samples[i]) && (samples[i] < current_smallest)) current_smallest = samples[i]; [/CODE] I know it is possible …

Member Avatar for Jsplinter
0
111
Member Avatar for arsshaw

> Specification: Display a menu > Find Errors in this program #include "stdafx.h" #include <iostream> //change io to iostream #include <string> using namespace std; // added I get the `Error 1 error C2065: 'choice' : undeclared identifier line 17 which is 'choice'` What am i missing? int main ()// added …

Member Avatar for arsshaw
0
407
Member Avatar for casjackkwok2001

Hello! I am working on my project..my code looks fine but I always get a wrong output. For example: I enter 11 for hour, 05 for minutes. The output should be display 11:05...but anyway it shows me 11:5 The zero is gone?? Is there anything i'm missing?? Please let me …

Member Avatar for Ancient Dragon
0
78
Member Avatar for bgx90

Can anyone tell me why my recursive find function for a binary search tree isn't working? It keeps returning false when searching for items that are in the tree. Thanks. [CODE=cpp] template<class T> bool BST<T>::find(const T& sitem) const{ //Precondition: // A binary search tree exists // //Postcondition: // If item …

Member Avatar for bgx90
0
95
Member Avatar for braineater

Make a project, consisting of 3 modules: student.cpp, course.cpp and register.cpp. Write source and header file for a program that registers students for courses. Design a class student, that stores the name of the student , the id number and array(vector) of all course numbers for which the student is …

Member Avatar for daviddoria
-2
153
Member Avatar for odonal01

Input Note: You must test object’s capability by using the provided driver. Then develop a new driver to process the Roman inventory list. Note you can add any new methods / friends functions to the extRomanType to complete the second part you deem necessary. The file will be in the …

Member Avatar for daviddoria
-1
162
Member Avatar for mattloto

I need to pass a 2D array of int's into a function, which is normally fine, but the issue is that I don't know the last depth of the array. I know how to do it if I knew the length of the last dimension, but it is user defined. …

Member Avatar for mattloto
0
127
Member Avatar for John Linux

I am reading in data from a textfile, specified by command line args eg.. <app> inputfile outputfile I have not yet done any file output, yet have developed some code. What I'm aiming for is printing out the shortest route from one node to another in a graph. *The graph …

Member Avatar for John Linux
0
207
Member Avatar for nomorewords

This is a program which finds if a 7char word is a palindrome and if it is it writes it in CAPITAL letters if not in small letters e.g aBcDcbA => ABCDCBA;;; CheetAH=>cheetah; [CODE]#include<iostream> #include<math.h> using namespace std; int main() { int l,d; char c1,c2,c3,c4,c5,c6,c7; cin.get(c1);cin.get(c2);cin.get(c3);cin.get(c4);cin.get(c5);cin.get(c6);cin.get(c7); l=c1==c7||c1==c7+'A'-'a'||c7==c1+'A'-'a';cout<<l<<endl; l=l&&(c2==c6||c2==c6+'A'-'a'||c6==c2+'A'-'a');cout<<l<<endl; l=l&&(c3==c5||c3==c5+'A'-'a'||c5==c3+'A'-'a');cout<<l<<endl; d=l?('A'-'a'):('a'-'A'); …

Member Avatar for WaltP
-1
90
Member Avatar for Maulth

Ok, so I'm done with my "Code Break" and I'm back in "action". A couple months ago I completely dropped programming to pay attention to other things in my life. I was only on the forums a brief period of time anyway, so most people probably don't remember me at …

Member Avatar for paulojrudi
0
360
Member Avatar for bernardMax

Can you develop C++ game for a university project and provide in a week? I'll pay by PayPal. Please email me at [email]snipped[/email] I will reply an email with requirements. Thanks.

-2
28
Member Avatar for NickMalone85

I'm having a problem with a homework assignment. I had to create a doubly-linked List class with an iterator. I have done this except there is one "display" method that displays a large integer that is stored in this List class. The method is constant and my custom Iterator class …

Member Avatar for NickMalone85
0
82
Member Avatar for notuserfriendly

Hello, i am programming a spreadsheet as my assignment. I have done it but the last step is to make it so uncalculated cells linked to other uncalculated cells need to be calculated. meaning if A1 hold the formula A1 = a2+a3 and if A3 in turn holds another formula …

Member Avatar for notuserfriendly
0
188
Member Avatar for deadelgabar

The program imitates a gambling card game. The program shows you three cards, then the program interchange them, and if you can guess correctly where a particular card is, you win. Here is some sample interaction with the program: Card 1 is the 7 of clubs Card 2 is the …

Member Avatar for NathanOliver
-1
201
Member Avatar for LevyDee

Hi, I have a homework assignment to copy the elements of one stack to the other except in reverse order. The algorithm is easy enough for me to figure out and implement. My only question is, I dont really understand how im supposed to add my own function to a …

Member Avatar for LevyDee
0
113
Member Avatar for NinjaLink

In my program below, I am having problems running my program. The error I receive is "could not convert `nextPermutation(((char*)(&elements)), n)' to `bool'" I just want to print out the permutation of ABC. Will someone please check my nextPermutation function to see if everything is correct. I know there a …

Member Avatar for NinjaLink
0
113
Member Avatar for DavidLuo

Hi.... Can anyone help? char message[] = "This is a message."; Write C++ code to print the string out backwards. Thanks.

Member Avatar for Epsilon92
-2
96
Member Avatar for Instinctlol

Hi guys, I am looking for a way to check for error. I have an array of names. The user will enter a name and it will check the list for that name. If that make is not correct, it will go back and ask the user to try again …

Member Avatar for Ancient Dragon
0
76
Member Avatar for Annettest

Hi everyone: I have written C++ code for populating a matrix/2D array with calculation results. Each column of the array represents results for a distinct time step. My problem arises because the rows of my results vector do NOT correspond to the rows of the matrix. The matrix includes extra …

Member Avatar for Annettest
0
103
Member Avatar for naseerhaider

Hello Every one ! This program is producing some strange output as it is only generating x = 6 :(,can some through some light that why is it behaving like this ? [code] #include <iostream> #include <stdlib.h> using namespace std ; main () { // Random Number Program int num,x …

Member Avatar for naseerhaider
0
165
Member Avatar for nikc121

I have been working on this code for two weeks. I think I have it down to the last couple of lines ie funtion to call from main. But I just cant seem to get it.. Please help, due at midnight..ANd this is my first class so be gentle. :), …

Member Avatar for WaltP
0
265
Member Avatar for Twonk

I am trying to write a student database. I've done most of it, however to improve im trying to write something that will display the infomation entered and then ask if this is correct, if it is then continue if not then start back at the entering data part. here …

Member Avatar for Joneswilliamsc
0
136
Member Avatar for Tvirusx1

I just can't seem to solve this. Heres what I want to do: I want my program to calculate movement, from one point to another. The function _updatepos is the main function, where I have troubles. It is supposed to, as the name says, update the position (posx and posy), …

Member Avatar for Tvirusx1
0
153
Member Avatar for onurozcelik

Hi everyone I have system that has classes derived from QGraphicsWidget. I manage derived class objects in layouts on QGraphicsScene. Now I need a compound item that contain two or more QGraphicsWidget in it and also I need to put that item inside my layout. So I choose QGraphicsItemGroup and …

Member Avatar for onurozcelik
0
201
Member Avatar for mbrinkley

I have been given an assignment to plan, code, and execute a program to calculate data about a person. I am not here asking about how to code the program, but rather to troubleshoot at what's wrong with my compiler/command prompt. Here's what's happening: I will code a program in …

Member Avatar for mbrinkley
0
231
Member Avatar for Instinctlol
Member Avatar for zdaxxy
Member Avatar for Salem
0
40
Member Avatar for phummon

Hi everyone, I'm a moderately experienced C++ programmer and a network engineer. I’m having a weird problem with using an array of vector<char *>, which I’ve never tried to work with before. I’m working on a program which does the following: 1. Inputs and parses a file called [B]PREFIX_FILE[/B], which …

Member Avatar for daviddoria
0
207
Member Avatar for bl@ck_d3ath-v2

hi i want help in my project m working on the BOOK class. plz make USER class as m getting alot of difficulties in it...i will user ur code as a reference code and will write my own code after undertanding it thnx

Member Avatar for NathanOliver
-2
1K

The End.