49,761 Topics

Member Avatar for
Member Avatar for soban

[code] #include <stdio.h> #include <conio.h> #include <iomanip.h> #include <ctype.h> #include <string.h> #include <iostream.h> #define input "d:\\tcpp\\bin\\files\\input.txt" #define tempo "d:\\tcpp\\bin\\files\\tempo.txt" void menu(void) { cout << "Menu\n\n"; cout << "A - Add\n"; cout << "D - Delete\n"; cout << "I - Display\n"; cout << "E - Edit\n"; cout << "S - Search\n"; …

Member Avatar for daviddoria
0
87
Member Avatar for Transcendent

for example 1*2*3*4*5*6 this is what i have: [CODE]#include <iostream> using namespace std; int main(){ int num =1; int i; for (i=1; i <=20; i++) { num *=i; cout<<num<< " * "; } system("pause"); return 0; } [/CODE]

Member Avatar for Shankye
0
164
Member Avatar for mzetka3

I'm new in c++ so please be patient. ;) I'm trying to create abstract fabric. My errors: [ICODE]1>ObslugaOkna.obj : error LNK2019: unresolved external symbol "public: __thiscall Figury_Produkoj::Figury_Produkoj(void)" (??0Figury_Produkoj@@QAE@XZ) referenced in function "public: static long __stdcall ObslugaOkna::WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@ObslugaOkna@@SGJPAUHWND__@@IIJ@Z) 1>C:\Documents and Settings\Mati\Pulpit\Nowy folder (4)\grs\Debug\grs.exe : fatal error LNK1120: …

Member Avatar for Fbody
0
88
Member Avatar for bookmark

Hi, I'm trying to get this program to read a file which contains a matrix. I am trying to output a text file which has the matrix of the input file but with the average of each row. Every time I enter the name of the inputFile and the outputFile …

Member Avatar for Fbody
0
208
Member Avatar for n0de

Hi, been programming all day long, and tryed to compile my program, everything is fine, except some kind of nonsense with ofstream.. These are the problems, and i don't know why ofstream says such things, because in my other programs everything is fine with seekg, or tellg, and everything else …

Member Avatar for n0de
0
370
Member Avatar for Rorkhill

Im creating a program in Dev C++ and the program has a switch statement in it to take the user to a differ 'page'. For example the user presses 1 and it takes them to a page that deals with orders etc. E.g. [CODE]switch(mainmenu) { case '1': Menu1(); break; }[/CODE] …

Member Avatar for Fbody
0
965
Member Avatar for bookmark

Hi, I need some tips on how to fix the errors of this program. I do not understand what the linker errors are telling me. thanks in advanced. the errors are Error 1 error LNK2005: _main already defined in test.obj test2.obj Error 2 fatal error LNK1169: one or more multiply …

Member Avatar for Ancient Dragon
0
133
Member Avatar for sadsdw

Hi friends, I have 3 different vectors, V1, V2 and V3. V1 and V2 have the same size and each line refers the same record. I would like to write a function that get each line from V3 and check if exists in V2, and if is == "M" in …

Member Avatar for sadsdw
0
134
Member Avatar for knellgust

[CODE] #include <iostream> #include<string> using namespace std; class Book { private: string title; double price; public: Book(); void setTitle(string s); void setPrice(double p); string getTitle() const {return title;} double getPrice() const {return price;} bool hasKeyword(string key); }; Book::Book() { title="None"; price=0; } void Book :: setTitle(string s) { title=s; } …

Member Avatar for Fbody
0
79
Member Avatar for Mona..

hi.. i write this statement there is no errors but it not showing me the out put this is the my code: [CODE] #include<fstream> #include<iostream> using namespace std; int main() { fstream infile; fstream outfile; infile.open( "classnames.txt",ios::in ); outfile.open( "bufferednames.txt",ios::out ); infile.unsetf( ios::skipws ); int ch; for( int i=0; i<4; …

Member Avatar for Mona..
0
236
Member Avatar for bookmark

Hi, I'm trying to make a program that reads a text file that contains about 4 rows of numbers and outputs the average for each row. I need help with these two errors. It is not complete but I need help on these so I can continue. Any help is …

Member Avatar for Perry31
0
185
Member Avatar for DynamicMember

i have this code,and it works.but after running it closes after milliseconds.anywhere i put "getch()" gives error.what to do?[code]#include <iostream> using namespace std; int main() { int i,j,k; for( i = 10; i >= 1; i-- ) { for( j = 1; j < i; j++ ) { cout << …

Member Avatar for profyou
1
107
Member Avatar for sweety20

plz can any1 tel me hw 2 write exactly the same program as peteranswers.......in c++....

Member Avatar for sanjon
-2
90
Member Avatar for TonyMUK

This is driving me mad. This program reads 8 records from an iseries data queue and then I get the segmentation fault. I can't work out why. Does anyone have any ideas? Please!! [CODE] #define WIN32_LEAN_AND_MEAN // Include the necessary DQ Classes #include <iostream> #include <fstream> #include <windows.h> #include <cwbdq.h> …

Member Avatar for TonyMUK
0
135
Member Avatar for blackcloudbd

Can any one help me with these codes: i m freaking out here I split my program in 3 parts. 1. main - prac.cpp 2. interface - base.h 3. implementation - base.cpp in prac.cpp the code is: [CODE]#include <iostream> using namespace std; #include "base.h" int main(){ Base ob; ob.set(); ob.get(); …

Member Avatar for blackcloudbd
0
177
Member Avatar for rohan1020

Hello... I am making a program that could automatically install programs with one click, skipping the task of clicking the buttons like "Next", "I Agree", etc. I know such software are already available in the market but I want to create a customized one with my knowledge of C++. I …

0
57
Member Avatar for skorm909

Basically what I'm trying to do is simple. My main problem is the random numbers, but in the comments i have some other issues... if you know how to fix them that would be great the other two main ones im having trouble with are: the do loop until the …

Member Avatar for jonsca
0
144
Member Avatar for DynamicMember

i need a program for this function s=1+1/3+1/5+... e=0.1 i dont know the e is...but in translation it is accuracy... Show me a way...

Member Avatar for jonsca
-1
111
Member Avatar for jmcorpse

I have to write a program that creates a dynamic array of five strings, store them and be able to access them. This is the code I have written so far. The console receives the information that is inputted, but I believe does not store them. Also I commented out …

Member Avatar for jonsca
0
88
Member Avatar for User4699

I'm trying to implement a maze program by using nodes that reads in a file and the user is able to enter a direction and solve the maze. My class will not output correctly and I've been working on it for a LONG time. Any help is appreciated! I also …

Member Avatar for Greywolf333
0
677
Member Avatar for hdb25

[CODE]#include <iostream> #include <fstream> #include <sstream> #include <cstdlib> using namespace std; int dectoint (string st); int hextoint (string st); int bintoint (string st); string inttobin (int n); //string inttohex (int n); //string inttodec (int n); int main() { string st; cout<< "Enter a number in dec,hex,or binary: \n"; getline(cin,st); if …

Member Avatar for hdb25
0
172
Member Avatar for baldwindc

Could someone please explain the following code to me? It's not for class, more personal curiosity. Thanks in advance [code=cpp] while(!feof(infp)) { fgets(buf, MAXLINE, infp); fputs(buf, outfp); } [/code] what I'm mainly curious about is the argument o feof "infp."

Member Avatar for Ancient Dragon
0
146
Member Avatar for Rickay

[CODE]#include <iostream> #include <windows.h> #include <ctime> using namespace std; double time1; int main() { const double seconds1 = time(0); string string1; while(1) { long double seconds2 = time(0); if(seconds2 == seconds1 + 5) { cout << "Five seconds went by.\n\n"; break; } } cin.clear(); cin.ignore(255, '\n'); cin.get(); return 0; }[/CODE] …

Member Avatar for Rickay
0
229
Member Avatar for dlube

how would you write a for loop that calculates the total investment over 40 years if a one pays $500 each month but every 2 years the payment increases 10%?

Member Avatar for smrati.katiyar
0
99
Member Avatar for yogibear13

Hi, I have a problem where I have to create a class called Employee and calculate things such as pay etc..Part of the problem is to override the stream insertion operator, and I did, but I have a problem with the syntax of printing something out. I have a method …

Member Avatar for Greywolf333
0
286
Member Avatar for spartanace

Im having a bit of a problem with my binary search tree. For some reason my pointers arent connecting correctly. I'm pretty sure everything is correct but when i run it I keep getting this as the result. It inputs the numbers 1 5 7 9. [CODE]void insert(string word,vector<treeNode> &x) …

Member Avatar for Greywolf333
0
121
Member Avatar for Nicanor

Trying to compile a program, in my accounts.cpp I have 2 errors accounts.cpp:240: error: name lookup of `a' changed for new ISO `for' scoping accounts.cpp:234: error: using obsolete binding at `a' here's the code bool cAccount::IsOnline( int acctnum ) { if (acctnum < 0) return false; map<int, acctman_st>::iterator iter_acctman; if …

Member Avatar for frogn8r
0
818
Member Avatar for skorm909

so basically whats happening is its saying that im trying to call on the function before it appears... here's the code: [CODE]# include <iostream> # include <cmath> using namespace std ; char name [40]; // lets the players name be up to 40 characters int choice; int goblin = 250; …

Member Avatar for skorm909
0
90
Member Avatar for Hyiero

[CODE] while(temp != NULL) { if(temp->info.Name == cName) { temp->info.DiscountNumber = temp->info.DiscountNumber + 5; flag = true; } if(temp ->info.DiscountNumber > 25) { temp->info.DiscountNumber = 25; // prev->link = temp->link; // delete temp; //temp->link = first; // first = temp; } //cout<<"Discount is :" //<<temp->info.DiscountNumber //<<endl; prev = temp; temp …

Member Avatar for Hyiero
0
731
Member Avatar for rebellion346

This is a program my instructor wrote and I have to create a program that similar in format. My issue is I don't quite understand what main is doing or how it works, was hoping someone could explain it to me in detail. Rolodex.h [CODE] #ifndef _ROLODEX_H_ #define _ROLODEX_H_ #include …

Member Avatar for Shantari
0
528

The End.