49,757 Topics

Member Avatar for
Member Avatar for Linda1

Another project on arrays. I need to get the smallest number in an array. Enclosed is code. Your input highly needed! [code] #include<iostream> using namespace std; int smallestnumberindex(const int number[int index]) int main() { int number[10]; int index; int smallestnumber; //initialize the array for (index = 0; index < 10; …

Member Avatar for Linda1
0
63
Member Avatar for Ratte

I need to read a text file that contains data of the following type: [code] John Doe 333222333 01/01/80 M PHY301 2005 Fall A PHY401 2005 Fall B PHY531 2006 Spring A John Doe 333222333 01/01/80 M PHY501 2005 Fall A PHY301 2005 Fall B PHY431 2006 Spring A John …

Member Avatar for vijayan121
0
126
Member Avatar for akoloff

I am wondering if it is possible at all to do the following things with modal dialog: I want some kind of task scheduler to automatically open dialog and execute the code, which is envoked usually by pressing the button inside the dialog. The problem is as soon as I …

0
47
Member Avatar for sarahger9

I wrote a program that searched a file word by word, looking for keywords from another file that needed to be replaced in the first file. I did this, but I need to state an error message if one of the keyword was never found. This is what i tried, …

0
54
Member Avatar for 4greatjustice

[code]#include <iostream> // for CableBills #include <iomanip> // for formatting manipulators #include <string> // for string variables #include <fstream> // for file streams using namespace std; // Prototype Functions void PrintHeading(ofstream& CableBills) ; // Inout void CustomerData(ofstream& CableBills, ifstream& CableRecs) ; // Inout int OutletCharge(int) ; int ServiceCharge(char) ; // …

Member Avatar for 4greatjustice
0
182
Member Avatar for slyrexy

Hey, i am a complete newbie to C++ and have a task to do. i have looked all though my textbook and all over the net and have not found any examples similar. my problem is i am trying to read from a text file and store the data as …

Member Avatar for slyrexy
0
82
Member Avatar for teppuus

Hello, I am trying to write data to a binary file. The function runs (the cout << "TEST" shows me that my loop is running the correct amount of times), but after the program comes to the end, it crashes and doesn't save the data to the binary file. Can …

Member Avatar for teppuus
0
82
Member Avatar for jenymaru08

i tried but it did not work.....please help me [code=cplusplus] #include <iostream.h> #include <conio.h> int length_str(char word[]); char cat_str(char word1[], char word2[]); void main() { clrscr(); char word[50],word1[50],word2[50]; int choice,z,y; do{clrscr(); cout<<"\t\tSELECT YOUR CHOICES" <<"\n\t [1] - tells number of characters the string has" <<"\n\t [2] - Concatenation of string" …

Member Avatar for ChaseVoid
-1
133
Member Avatar for jamess_jack24

[code=cplusplus] /*-------------------------------------------------------------------------- This is dllist.h file for defination of funcations -------------------------------------------------------------------------*/ #ifndef DLL #define DLL class DLLElement { public: DLLElement( void *itemPtr, int sortKey ); // initialize a list element DLLElement *next; // next element on list // NULL if this is the last DLLElement *prev; // previous element on …

Member Avatar for jamess_jack24
0
108
Member Avatar for Llama

ok so i made a code that makes something compatible with a never version ( it is not important). This is my code: [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main () { char File[150], re[4]; string line[5000]; string response; int counter=0; size_t found; string strtofind[]={"oolean1", "oolean2", …

Member Avatar for Llama
0
238
Member Avatar for Duki

I get error C2143: syntax error : missing ';' before '*'[/code] at the typedef line (and every other line with the word 'string'). ... //File: prob4.h #pragma once //header files + efficiency #include <string> #include <iostream> using std::cin ; using std::cout ; using std::endl ; typedef string * strPtr ; …

Member Avatar for Duki
0
886
Member Avatar for pacman326@gmail

Hi guys, our goal is to try to create a c++ rendition of the same game. I have coded all the way up to the first real part of the program, trying to remove cells based off of what the user inputs. [code] #include <iostream> #include <cstdlib> #include <ctime> using …

Member Avatar for pacman326@gmail
0
56
Member Avatar for Underdog67

This is what the code looks like. It's a simple program to determine which years are leap years, and which aren't. I'm having trouble ending the program if the user types ctrl-z. Any help would be appreciated. I know it's probably something simple, but I can't figure it out. :( …

Member Avatar for Underdog67
0
807
Member Avatar for sarahger9

Hi, I am writing a code that requires me to search for words within a text document. I had to build up words one character at a time in order to ignore punctuation when I search for the words. I did this without a problem. But now I am working …

Member Avatar for sarahger9
0
120
Member Avatar for Fool

This is a thread containing a problem similar to my previous thread"a crazy problem(at least to me)". Yet i start it in a new thread is because the approach will surely be much more complicated and perhaps should be treated as another crazy problem. This program should read in 2 …

Member Avatar for Fool
0
115
Member Avatar for wjyeo

Hey guys i need help over in my program. My error is that when i use cin for a int declaration, when i type in a char, they straight away have a infinite loop. I try using the cin.clear() but when i prompt the user to "enter a number again" …

Member Avatar for wjyeo
0
245
Member Avatar for NicAuf

I think that the only function that needs fixing is my ComputeHourlyPay function. Could somebody take a look and help me out here. [CODE=cplusplus] //Name: Nick Auffarth //Class: CS 140 Section 003 //Assignment: p03 //Date: October 15, 2007 #include <iostream> #include <iomanip> #include <cmath> #include <string> using namespace std; const …

Member Avatar for NicAuf
0
118
Member Avatar for akame

i plotted a parabola....when i try to join the previous pixel with the next pixel,it does not come out to be straight???cant we draw a smooth curve....joing pixels???if no then why???

Member Avatar for Salem
0
128
Member Avatar for Church

well i'm a bit of a beginner programmer.. i've taken a few classes but every time i look at a piece of code i get lost easily. But i do have a question.. I was reading this visual basic book and there was this thing about listing all of these …

Member Avatar for Church
0
107
Member Avatar for gallantmon1

I'm still confused with file i/o here and needs a bit of help on fixing the codes I have. Can anyone offer some help? I have two codes here that sort of work together. One is a database type of code that is supposed to get input form the user …

Member Avatar for gallantmon1
0
247
Member Avatar for Koldsoul

Hey fellow programmers. I am just starting to work on C++ and languages in computer programming. So far its not bad yet, but having an issue with this program I am trying to write. The program I am writing is to compute the sum of the minutes exercised per week, …

Member Avatar for Koldsoul
0
263
Member Avatar for pacman326@gmail

Hi guys, here is my code. [code] #include <iostream> #include <cstdlib> #include <ctime> using namespace std; void chooseNumber() { int gameRow, gameColumn; cout << "Please enter two values, the row and column of the cell " << "you would like to pull from the gameboard." << endl; cin >> gameRow; …

Member Avatar for Narue
0
78
Member Avatar for katcipis

Hi, im starting to program in c++ and im starting to post in this forum too :-), i hope in the future i can help other people too but right now im the one who is needing some help. Im in the development team of a multi plataform software and …

0
42
Member Avatar for jrice528

This program was suppose to be with a function but I am trying to write without a function first, then adding one later. I am new to programming and still gettin basics. I got this much but its only giving me a 1 and a 0. Ive tried to find …

Member Avatar for iamthwee
0
177
Member Avatar for barbie 2

hi , i'm writing a program which calculates registration fee of student and this program opens an external txt file.It's my first time writing a program with an input file so i'm kinda confused.my program asks for the status and number of credits but does not gimme the fee. #include<iostream> …

Member Avatar for iamthwee
0
168
Member Avatar for MedianHansen

When i try to compile my source code, it comes up with two errors: the first one is: cannot find -lobjc the second one is: Id returned 1 exit status

Member Avatar for MedianHansen
0
76
Member Avatar for frozenflame2

[code]#include <iostream.h> int main(void){ char a; char b; cim >> b; b=b-'a'+'A'; cout << b; return 0; } [/code] I am like about 2 weeks into programming, so I am pretty simplistic in my programs. If you put that into like a Borland Compiler (not sure if other compilers use …

Member Avatar for Narue
0
112
Member Avatar for eddy518

Hey Fam, I’m working on this ..so far this is what I have..(after almost 2 1/2 frustrated hours) As a newbie, I figure out somehow the remainder and the prime concepts. I’m finally happy that I have 0 error but the program doesn’t do what I expected! Eventhough I tested …

Member Avatar for Salem
0
111
Member Avatar for sneha_venky

for my school project , i need a very simple game (can be textbased ) i need help pleasseeeeeee.........................:'(

Member Avatar for vijayan121
0
215
Member Avatar for toko

i would like to make a client choose with words rather than numbers. Instead of the conventional way of using numbers to retrive commands i need to make a client write words for example they type in "add" to get 2 numbesr to add and so on. any help is …

Member Avatar for Narue
0
66

The End.