51,593 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
80
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
131
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
187
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
85
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
92
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
140
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
129
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
242
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
913
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
59
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
821
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
124
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
119
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
248
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
122
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
133
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
110
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
249
Member Avatar for Duki

So, I've ordered two separate books for studying C#, and am sending them both back. One was Murach's C# 2005 and the other is Illustrated C# 2005 by Daniel Solis. Neither of them were written the way I like to learn; I prefer a textbook style of learning with exercises …

Member Avatar for Samson_ZXL
0
70
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
270
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
81
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
43
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
180
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
170
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
82
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
116
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
113
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
218
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
69
Member Avatar for toko

i was wondering whenever you create a file in c++ where does it go cuz i've never seen anyone specify the root..

Member Avatar for toko
0
95
Member Avatar for toko

Okay, i have written a code to figure out the area of all different shapes but i can't get it past hte pasrt where the client chooses what they want to find the area of. this is my code: [CODE]#include <iostream> #include <cmath> using namespace std; int getChoice(); int circle(); …

Member Avatar for toko
0
301
Member Avatar for lhay

[COLOR=DarkSlateBlue]undefined[/COLOR]pls!help me to my project in cs programming about in the smallest and biggest and to find it averages!!!!!!!!!!!!!!!!!!!pls!!!!!!!help me!!!!!!!!!!!!!!!!!!thank you!!!!!

Member Avatar for preeti madan
0
109
Member Avatar for Fool

i have to decide a program to "satisfy" my crazy private tutor .This program reads in 2 input extremely large postive integers. It will then output their sum. However , as C++ got limit in int, so i think i need to use string variables to represent the values..then use …

Member Avatar for Fool
0
318
Member Avatar for nshh

Variant Excel,Workbooks, Workbook; Variant Worksheets,Worksheet, Range, Cell, FColumns, Format, Item; Excel = CreateOleObject ( "Excel.Application"); Excel.OlePropertySet("Visible", true ); Workbooks=Excel.OlePropertyGet("Workbooks"); Workbook=Workbooks.OleFunction("Add"); Worksheets=Workbook.OlePropertyGet("Worksheets"); Worksheet=Worksheets.OlePropertyGet("Item", 1); Its working well as a stand alone program. But i include the same code in the button of my project I got this error in run time: …

0
79
Member Avatar for Linda1

I am very new to C++ and one of my homework assignments involvemulti dimensional arrays. I was able to initialize and input and display the array (4x4) but the last step is to swap the data of the row to that of the column. Tried different ways and unable to …

Member Avatar for Linda1
0
129
Member Avatar for FAZ3

Can someone help?...I'm a mac user and I need to know how to create an input.dat file in my project so it can read off data in the file. I tried adding a new file but when i try to open it on my program w/ inData.open("input.dat"); the program doesn't …

Member Avatar for Ancient Dragon
0
67
Member Avatar for towhoe260

This is my assignment and im pretty confused. Our book is a horrible book, and i cant seem to understand much of it. So i was hoping maybe someone could point me in the right direction in getting started. tHis is what we are expected to do. Write a program …

Member Avatar for Dave Sinkula
0
145
Member Avatar for Llama

I want to make a code that searches a text file and finds a certain string, and then changes that string to another string. First im going to have it input the whole file, and i am couting it too, so that i can make sure it worked. But it …

Member Avatar for Llama
0
155
Member Avatar for toko

I need to make the computer to choose a number between 1 and 10 and i don't know how? Please give me any help you can. Thanks for any help u provided ;-)

Member Avatar for zandiago
0
38
Member Avatar for bc030400412

Write a TSR program that changes the background color of the screen to red every 5 second and then white next 5 second, And this continues until you press ‘Q’ It should not modify the text displayed on the screen. Hint: 1_ Intercept Keyboard interrupt (0x09H) 2_ Use video text …

Member Avatar for Ancient Dragon
0
284
Member Avatar for onlyled12

I am very new to programming and am in a class that has quite the frustrating instructor. He gives very simple examples then asks very complex questions. Complex to me atleast. Anyone who could shed some light on these would be greatly appreciated. Write a program to play a number …

Member Avatar for zandiago
0
432
Member Avatar for mstrmnd2008

I am doing a c++ assignment and just need a little help. I would just like to know how to get the ASCII code number after inputing an ASCII character. The user of this program should be able to input an uppercase letter and recieve the ASCII code value and …

Member Avatar for Narue
0
143
Member Avatar for lvphoenix

Hey All I am having issues with my code and it has something to do with the way my double linked list is working. I cant figure out if its not setting the m_prev pointer if at all and what is going on with my m_next pointer. Any help would …

Member Avatar for Narue
1
181
Member Avatar for liphoso

Can any one help..... I am relatively new to programming and I would like to learn a bit of C++. I dnt want to purchase a book as yet (mainly because i cant afford one at the moment). Can any one refere me to a site from which I will …

Member Avatar for eranga262154
0
82
Member Avatar for patrickyeow

hello, i have write a program and when i compile it, it say that one of my variable 'advance', is a ambiguous symbol and cannot be used....why? after i change the 'advance' to other word, like 'advanced', it run nicely....but why 'advance' word is ambiguous in this program? [code=cplusplus] #include …

Member Avatar for vijayan121
0
251
Member Avatar for krizz

I need help with the following: How do we calculate the sum of consecutive numbers from 1 to n and not from n to 1 by using recursion. Eg. if n = 10 it should be 1+2+...+9+10 and not 10+9+...+2+1.

Member Avatar for anirudhbsg
0
992
Member Avatar for aismm

i need to write a program that includes student names, test scores, and grades... but the cin.getline doesn't work, it simply skips to the next line... where did i do wrong? Thanks. [code] #include <iostream> #include <iomanip> using namespace std; char getLetterGrade(float grade); struct course { char name[30]; char *letterG; …

Member Avatar for Salem
0
6K
Member Avatar for rkreed94

I am new to this site and it was recommended by a friend and class mate. I am having serious issues in OOP. Did great in C++ last semester but our new book is killing me. I am trying to get this program going with polynomials. The professor gave us …

Member Avatar for ithelp
0
98

The End.