49,761 Topics

Member Avatar for
Member Avatar for lancevo3

I have to write a function that takes an input such as this chevrolet, MALIBU and makes chevrolet into CHEVROLET and MAILIBU into Malibu I am having no trouble with capitalizing the CHEVROLET but when it comes time for the Malibu to be corrected it doesn't come out right. directions …

Member Avatar for Clockowl
0
158
Member Avatar for ammonation42

i am at uni an i have a project in which i have to create a backgammon game. i have created the board the dice and the moves, now i need to do the legality of the moves i was wondering if anyone had an idea of how i would …

Member Avatar for jephthah
0
93
Member Avatar for lancevo3

I'm working on a program which requires me to read in a file of input and organize it by calling a few functions. The first function I'm writing breaks up the input and assigns it to the appropriate array. For some reason what I keep getting back is random values. …

Member Avatar for lancevo3
0
213
Member Avatar for sabian4k

I don't understand what getstream is about nor do i know how to change a certain part in an array to something else. please help me. [code] // ************************************************************************** // // Airplane.cpp // // Program that displays the seat diagram for an airplane and allows the user // to select …

Member Avatar for Lerner
0
150
Member Avatar for danishamman

Plz provide me complete discription of four algorithms used for sorting arrays e.g bubble sort.

Member Avatar for jephthah
0
224
Member Avatar for camonchain

([I]Invoice class[/I] Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables— a part number (type string), a part description (type string), a quantity of the item …

Member Avatar for jephthah
0
190
Member Avatar for soulbee1

Forgive my ignorance, I am learning. I am writing a C++ BlackJack program for school project. I have googled and incorporated the following code into my project. My results are I am getting a value for the cards of 2 - 5 and i do not understand why. If someone …

Member Avatar for nucleon
0
729
Member Avatar for RayvenHawk

I have an assignment that needs me to read in a file that is a source code in a .txt file. Then read in a file listing c++ keywords. Examine the first file for those keywords and convert them to lowercase and export the new file into a .cpp file. …

Member Avatar for RayvenHawk
0
88
Member Avatar for dulahdaglace

i want to read to a 2d-array from a file, but for some reason the file is not opening (at least thats what the output says) [code=cplusplus] #include <fstream> #include<string> #include <iostream> using namespace std; int main(){ string filename; cout<<"Please type the name of the file"; cin>>filename; fstream file(filename.c_str());//same result …

Member Avatar for dulahdaglace
0
241
Member Avatar for Clockowl

Hey guys, How do you handle exceptions in your programs? For instance, I have this function: [code=cpp]bool load_file(const char *filepath, std::string &dest) throw (std::bad_alloc, std::runtime_error) { using namespace std; ifstream file; file.open(filepath, ios::binary); if (!file.good()) { throw runtime_error("Couldn't open the file"); } //get filesize in bytes from ifstream //seek end, …

Member Avatar for Clockowl
0
103
Member Avatar for ganil_22

Hi, I am looking for some good examples on calling c and C++ apis inside python code. Can anybody share good examples or links. Thanks, Anil kumar

Member Avatar for joph
0
51
Member Avatar for invinate

hi, i'm new here and got a really simple problem. i need to parse a conf file, where # is a comment, like this: [CODE] # Begin conf VAR1 = VAL1 VAR2 = VAL2 # end [/CODE] i want to skip all comments and read VAL1 and VAL2 to members …

Member Avatar for satarupa
0
530
Member Avatar for r1ian2

i need help on how to create a C++ program that will input string of characters and will count the number of different vowels, consonants and symbols included in the string. Input a string => "program!" total letter 'a' => 1 total letter 'e' => 0 total letter 'i' => …

Member Avatar for ArkM
0
90
Member Avatar for everard

I have two MFC Window Form. The main window will call the second window to process a necessary input then the result generated by the second window should appear in the main window's edit box. But the problem is I don't know how to do it. Does anyone knows how …

Member Avatar for everard
0
87
Member Avatar for lancevo3

Hey guys I need to copy multiple string arrays into one array to use to display output. I need to copy the name, addr, telephone, carinfo, payment array to the output array. How would I go about doing that. [code=cplusplus] #include <iostream> #include <iomanip> #include <fstream> using namespace std; void …

Member Avatar for Ancient Dragon
0
108
Member Avatar for TuX4020

Hi all, So I've got an assignment of creating a priority queue using a heap data structure. I've read lots of pages online about the heap data structure, but I keep coming up with questions. In my class, I got the impression that a heap was structured similarly to a …

Member Avatar for jrw0267
0
134
Member Avatar for shea279

I cannot run my application on another computer when I compile it in VS2008. Error: "This application has failed to start because the application configuration is incorrect." and I have define WINVER to be 0x0400, and it is compiling in release mode. and this is NOT .net

Member Avatar for Ancient Dragon
0
596
Member Avatar for LucyB

Suppose I have a dynamic array.(trees) The user enters the number of times for the dynamic array to loop based on int num. He has filled the array, say num=3, so he has entered the age of 3 trees into trees[i]. Now he wants to display the age of all …

Member Avatar for Clockowl
0
82
Member Avatar for jackalope686

I am in a beginners programming course, and we have been doing C programs up until now, and the first C++ program we have confused me a bit. We have to make a simple tic tac toe program that plays against you [it doesn't have to be great at playing, …

Member Avatar for jackalope686
1
399
Member Avatar for Kungu

Hello, am new to this so please bear with me. I'm working on a windfarm simulator in C++, it has to read in data from a .csv file and calculate various power values. Anyway that's beside the point. The problem I'm having with is the 2 Dimensional Dynamic Array that …

Member Avatar for StuXYZ
0
142
Member Avatar for blamp

I have started the program but I need help with createing a class which works for both integers and characters. [code] template< class T > class List { private: struct node { T data; node * next; } node * head, * tail; int size; public: List(); void Push_Head ( …

Member Avatar for Clockowl
0
122
Member Avatar for trixymix31

Hi, Thank you for helping with this. I basically have to encrypt a file in where the user enters the file name & enters a name for the output file. The encryption is based on the password the user enters. It is a case situation, that being said, if the …

Member Avatar for trixymix31
0
164
Member Avatar for wuzj1988

this is my program [code=cplusplus] // // custorderscf2.cpp // #include <cstdlib> // student ...... Jones, Patricia #include <iostream> // section ...... MW row .... 4 #include <fstream> // due date ..... xx/xx/xx #include <iomanip> // refer to ..... Gaddis Ch3 void SetPrecision(int); // procedure prototype using namespace std; // avoid …

Member Avatar for wuzj1988
0
144
Member Avatar for f.ben.isaac

I need to know how i did? Any review will be appreciated... [CODE]/**program description: * * this simple program represents * the basic concept of threads. * main() process will create a * thread that calculate numbers * while main() output the results. * main() and threadProcess() share * share …

Member Avatar for Clockowl
0
150
Member Avatar for karen_CSE

Hi, I'm doing this programming exercise for my C++ class. I'm using Microsoft Visual C++. for some reason, the program wouldn't save my data. Can someone please take a look at my code and tell me what I did wrong? [code] /* Chapter 12 HOMEWORK Dung Tran CS 116 C++ …

Member Avatar for Narue
0
418
Member Avatar for cause&effect

I'm trying to implement a simple version of Wari logical board game. My implementation supposes to allow two humans to play the game. I have created array of 12 elements, each element represent the square. Every square has a number of stones. My problem is that I don’t know how …

Member Avatar for Clockowl
0
88
Member Avatar for Niner710

Hi, I am new to Visual Studio 2005 and wanted to package up my code into a .EXE file. I also have other code not specific to Visual Studio that I want to package(LabWindows CVI). Can anyone give me instructions or point me in the right direction.

Member Avatar for ArkM
0
122
Member Avatar for SmokyMo

i have following code, i am starting a college project and need help [CODE]#include "stdafx.h" #include <iostream> #include <string> using namespace std; class ba146{ private: int capacity; int totalSeatWindow; int totalSeatAisle; int totalSeatMiddle; public: string timeOfArrival; string timeOfDeparture; string departureCity; string arrivalCity; string flight; string seatType; int occupiedSeatWindow ; int …

Member Avatar for SmokyMo
0
131
Member Avatar for xonxon

What is the sequence for inorder, preorder, postorder for ----------------------A--------------------------- ---------------------/--\-------------------------- --------------------B---C------------------------- -------------------/-\--/-\------------------------ ------------------D-E-F------------------------- ----------------/-\-/-\--------------------------- ----------------G-----H-------------------------- Is it correct for Inorder:GDBHEAFC Preorder:ABDGEHCF Postorder:GDHEBFCA if someone out there can help that will be awesome.

Member Avatar for Grn Xtrm
0
84
Member Avatar for scamguru

I have a problem like i need to include a different header files depending on the linux kernel in a .cpp file. I have to check the linux kernel version and include the headerfile depending on that kernel. How can I do that? I have ARCH variable in Makefile which …

Member Avatar for PirateTUX
0
531

The End.