49,757 Topics

Member Avatar for
Member Avatar for Navlag

Hello all, I am building a small file system in c++ that builds a table in a file called test.txt from information on another file. I am trying to copy the information over and then access a specific part of it based on the date. The data is copied over …

Member Avatar for Navlag
0
267
Member Avatar for AlexFG

Hello everyone, I'm taking a C++ class in college and the last assignment for the semester is to write a sub hunter game that's worth 25% of my grade so needless to say I have to do a very good job on it. The due date is in 9 days …

Member Avatar for AlexFG
0
197
Member Avatar for Arkinder

I am not exactly sure what information is relevant, so my apologies for any useless/redundant information. On my Mac (Snow Leopard 10.6.8) with xCode (gcc) compiled and run through the terminal the following works fine (ignore code and continue reading): [CODE]#include <istream> #include <string> #include <iostream> #include <fstream> enum Year …

Member Avatar for Arkinder
0
383
Member Avatar for smmcfarl

I am having trouble with a program where I have to read in 40 numbers from a file and search them, 20 are successful searches and the other 20 are unsuccessful. I am supposed to show the number of comparisons it takes to find the numbers as well, this is …

0
78
Member Avatar for mc3330418

What is the easiest fastest way to see what's in these three arrays. I just want to see what 's in there to make sure my function is working correctly. [CODE] #include <iostream> #include <iomanip> #include <fstream> using namespace std; const int MAX_ITEMS = 50; int readData(string studentNames [], int …

Member Avatar for mazzica1
0
80
Member Avatar for MousehDragon

So I have 3 classes, matrix.h, matrix.cc, and shortestPath.cc shortestPath includes the .h file, which includes the matrix.cc file. In shortestPath I've tried to call a Get method I wrote in the matrix.cc file, but I can't figure out how to call the function on the object of that class. …

Member Avatar for mazzica1
0
300
Member Avatar for iGuardian

In this excersize you will write a program that reads in two positive intigers that are 20 or fewer digits in length and then outputs the sum of the two numbers. Your program will read in the digits as values of type char so that the number 1234 is read …

Member Avatar for WaltP
0
131
Member Avatar for mazdasa

actually I had a problem to reverse my string using stack.. can anyone help me? this is a sample of my code : [ICODE]#include<iostream> #include<stdlib.h> using namespace std; void push(); void display(); void pop(); struct words { char data [20]; struct words *next; }; words *head; main() { int i; …

Member Avatar for WaltP
0
252
Member Avatar for suiram

I have a text file which has data in it in the following format: string string char int double string Each field is separated by a tab character. The last string of every line contains multiple words. The file can have up to 50 lines (I am guessing if I …

Member Avatar for Clinton Portis
0
254
Member Avatar for UltimateKnight

Hi guys. What my problem is basically either some typo, or I am doing something extremelly wrong. Can't think of something else. After some time off with C++ I got back with it, creating the simple project to see how well my memory serves me. I am pretty sure that …

Member Avatar for UltimateKnight
0
98
Member Avatar for Thermalnuke

Im having problem with this code I made for finding the average rain fall. When the program starts. it is suppose to go through each month and you are able to input the rainfall. When the months show up in the CMD it is just a bunch of numbers and …

Member Avatar for Thermalnuke
0
142
Member Avatar for WhosThatGuy

Hello everyone, Ive been stuck with this little problem for quite some time and if someone could help id be much obliged. I have this code that contains an array with several numbers in put by the user and i don't want any of the numbers in the array to …

Member Avatar for WhosThatGuy
0
180
Member Avatar for JwhateverJ

I'm writing an application launcher program. The launcher will launch applications based on the files found in the working directory. (Example: a folder containing files with the extensions .docx, .xlsx, .sln, and .txt, would give the user the option to launch Word, Excel, Visual Studio and Notepad loading any of …

Member Avatar for cox44
0
912
Member Avatar for mrym

i've some code written as a dll in C++ in Visual Studio 2008. I've to be able to debug it. But i can't load dll in test exe. There isn't any problem on my test exe because when i try to load another dll there isn't any problem. Dll that …

Member Avatar for thines01
0
329
Member Avatar for bjigop
Member Avatar for seion

Practicing C++ and here is two of the practice problems I pulled from the FAQ And practice post. Just want feedback and issues with the way I wrote these. Simple Calculator [CODE] #include <iostream> #include <string> #include <sstream> #include <stdlib.h> using namespace std; int main(void) { //cout << string(50, '\n'); …

Member Avatar for Clinton Portis
0
152
Member Avatar for crystalll

how would I get this code to recognize a tie in the game? /* TicTacToe Game */ #include <iostream> #include <sstream> #include <string> namespace Games { class TicTacToe { public: TicTacToe(void); void Play(void); void Reset(void); private: char board[9]; char player; static int wins[24]; void displayBoard(void); bool getMove(void); void initializeBoard(void); void …

Member Avatar for Schol-R-LEA
0
606
Member Avatar for Desh2350

Hello All, I've put together this program for a rational class and it runs, but the problem is, it doesn't do what it's supposed to do. Any ideas? Thanks in advance. See ya on the flipside, Desh2350 [CODE]// This program will do arithmetic operations on two rational numbers entered from …

Member Avatar for Schol-R-LEA
0
4K
Member Avatar for mravignesh

Hi Sir, In VC++ 6.0 i have created button in the form which open as default after we created DIALOG BASED Application. If we click that button next form should load... For that what we have to do ..?? Kindly help sir.. thanks in advance

Member Avatar for Ancient Dragon
0
33
Member Avatar for apert

Hi guys, im sorry if my English very bad :) i got problem with this char str[] = "staff101"; i would like to split "staff" and "101" and cout them. im beginner in c++ hope you guys help me thank... any idea guys if c++ can generate pdf because im …

Member Avatar for Ancient Dragon
0
152
Member Avatar for learner guy

Hi ,help needed in bishop movement c++..the code is woking fine giving desired output most of time but there is one thing unintentional happening in the algorithm.. to understand the problem plz see the diagram (ignore the 'oo' and 'o' and consider them double and single spaces respectively, they are …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for omer620

Hello guyz how r u all i m new in programming can u help me plzz can u tell me that how to arrange array elements in ascending in descending order in C++ e.g suppose we have an array of 6 elements.. let elements are 65289...i want to arrange them …

Member Avatar for ppt123
0
232
Member Avatar for Vasthor

4-6. Rewrite the Student_info structure to calculate the grades immediately and store only the final grade. What I proceed:- I doubt that data structure can 'hold' function or expression, so I give a look on net to check out, it seems, the tutorial(on net) just show that structure used for …

Member Avatar for Schol-R-LEA
0
247
Member Avatar for Assassin7893

Guys, I've been stuck on this for a while now. This is actually one of my assignments, and I'm really lost. This is the assignment: ------------------------------------------------------------------------------------------- You manage a .txt file containing the customer ID number and account balance of the members of a bank. Last week, a computing error …

Member Avatar for Assassin7893
0
854
Member Avatar for t2ac32

Hi every one well i have this problem: Im creating a method for multiplying two different lists sorted in arrays example: MyList a [9,9,9,9] * MyList B[1,1,9] the problem is that i was told not to convert to a large int and then multiply like this 9999*9 +9999*1+9999*9 Since the …

Member Avatar for t2ac32
0
1K
Member Avatar for luftey

I'm currently on my final C++ project for the semester. My assignment is: =================================================== Programming Assignment 6 Attached Files File data.txt (0.628 KB) File sample_dynamic_array.rtf (33.957 KB) The attached text data file contains a list of numbers between 50 and 150. Create a program that reads those values into an …

Member Avatar for Schol-R-LEA
0
230
Member Avatar for iGuardian

[code]/* File: Rainfall.cpp Description: Write a program that reads in the average monthly rainfall for a city for each month of the year and then reads in the actual monthly rainfall for each of the previous 12 months. The program then prints out a nicely formnatted table showing the rainfall …

Member Avatar for iGuardian
0
1K
Member Avatar for jankeifer

guys, can you please suggest a 2 player game? any 2 player game as long as the difficulty of coding is at an intermediate level. thanks! :D hope for some replies soon.

Member Avatar for Sgt. Pepper
0
176
Member Avatar for Sphiros O'kelli

Hey!! I'm new to C++, this is the final program of my semester and I am stuck sooooo hard... I have the code laid out and it will compile but my functions wont work like I want them too. here is the code: [CODE] #include<iostream> using namespace std; void getlist(int[], …

Member Avatar for Sphiros O'kelli
0
286
Member Avatar for harde

The program should calculate the average of the values stored in the [B]rates[/B] array. It then should display the average rate on the screen. Display the average with two decimal places. Complete the program using the [B]for [/B]statement. Save and then run the program. Complete the program and also have …

Member Avatar for Schol-R-LEA
0
228

The End.