49,761 Topics
| |
Hi all, I have an issue with a piece of code that I am writing. The problem I'm facing is that I have a base class and a derived class, and the base class contains a pure virtual function. I then want to overload the pure virtual function with a … | |
Hi, I've got an assignment regarding the use of gotoxy in for loop,the result i'm supposed to get is this **** **** **** **** **** **** **** **** Please help me out.. | |
Hello DaniWeb, I'm relatively new to DaniWeb, and recently decided to come back to an attempt at learning to C++. I just finished reading a particular section on OOP etc. and i have some questions about pointers to objects: like: [CODE] MyClass *Object; [/CODE] Can someone please: 1) Explain why … | |
Hello everyone. I know how to create a .exe file, but I do not know how to "install" my .exe on another persons' computer. I realize that I could just make all images, sounds, etc, into resources, and simply have someone execute my .exe file, but I want to "install" … | |
I have if statement which doesn't return true even though it should. [CODE] std::vector<__int64> numbers; for( __int64 i = 2; i < input; i++ ) { numbers.push_back(i); } __int64 tmp = 4; for (unsigned int i = 0; i < numbers.size(); i++) { [U][B]if ( numbers[i] == tmp )[/B][/U] { … | |
I am making a program for my class where I handle equation problems such as: 2a-3b+5c=10 3a-2b-3c=-5 where the answer would be: 5a-5b+2c=5 This is what I have so far. It still isn't perfect cause I still haven't figured out the "=" part. I do have it performing the math … | |
Hi.. Can anyone please help me to write the following program: Write a program that will calculate the price to be paid for the development of photographs. The program must use two overloaded functions, each named calcTotal. If the client wants jumbo photographs, and the film is a 36 exposure … | |
i am using window 7 .in window 7 tubo c++ does not support full screen mode .i want to use the graphics functions of turbo c.i am unable to use graphics in turbo cin window 7.so please anyone tell me the solution. | |
I'm working on a project from school - airline reservation system. I have a slight problem. I created a class time and another class aircraft. In the class aircraft i have created two private data members of the type time - atime, dtime. Now why does the compiler flag an … | |
the following is the code... #include<iostream> #include<iomanip> using namespace std; int main() { float start_temp,stop_temp; float step,F,C; cout<<"start temperature:"; cin>>start_temp; cout<<"stop temperature:"; cin>>stop_temp; cout<<"step temperature:"; cin>>step; float i=0; cout<<setw(10)<<"celsius"<<setw(15)<<"fahrenheit"<<endl; cout<<setw(25)<<"celsius"<<setw(15)<<"fahrenheit"<<endl; for(i=start_temp;i<=stop_temp;i=i+step) { C=(5.0/9.0)*(i-32); F=32+(9.0/5.0)*i; cout<<setprecision(2); cout.setf(ios::fixed); cout<<setw(10)<<C<<setw(10)<<i<<setw(10)<<F<<endl; } } and the output for the above code is: start temperature: 0 … | |
Hi, Say i have 2 functions with same name and same parameters but different return type, then would that be functions following function overloading concept? Kindly give me a reference of the same.. | |
Hi, I want to know if I can use the structure pointer -> to access a structure that is in an array. currently I am using this: [CODE] while (inFile.good()){ inFile.getline(cstring,80); [B] (*points[size]).x = strtod(cstring,&pEnd); (*points[size]).y = strtod(pEnd, NULL);[/B] size++; } [/CODE] points is a pointer to an array of … | |
Hello Everyone I have been looking on the net and I found a few things but I am a bit think :P. I need more of a walkthrough kind of things. I am currently making a programe for a game and I need to access a database that has information. … | |
Hi guys, im experimenting with vector functions, but are unable to come up with anythin constructive. basically i have this file that contains information. sorta like a friends list. I need to store in an array, and i decided to use vectors for this. Any help please? data.txt [code] <div … | |
Hi I have Fedora Core 5 2.6.17-1.2174_FC5 with gcc version: gcc (GCC) 4.1.1 200 60525 (Red Hat 4.1.1-1) everything compiles well, and run smoothly on my machine. But the actual production machine is Linux 2.4.20-46.9.legacysmp with gcc version gcc (GCC) 3.2.2 20030222 (Red Hat Linux 3.2.2-5) on the production machine, … | |
I have this code and I am having trouble figuring how to make it run without any errors, can anybody give me some pointers on how to fix it [CODE]#include <iostream> #include <string> #include <iomanip> using namespace std; class TicTacToe { private: char theBoard [3][3]; public: TicTacToe(void); void playOneGame(void); void … | |
how can i create a parse tree if i am using recursive descent parser G->ET like g() {E();T(); }..... | |
Hi all, Im new to this website, and mostly to any type of programming. Recently Im trying to learn C++(Game Programming), and my father wants me to make him a web-based application, that flashes the window wether there is any sound playing(I believe it's called an audio visualization), I talked … | |
Hi, everybody! I'm currently building a C++ Forms application for my supervisor to track employee sick/vacation time. The program reads each employee's information from a file, and I want to be able to display each employees information in a label. (The binary files have been created successfully and the file … | |
hi, i've writen a function to get a sub array from another array [code] subarray(int* Array, int start,int end) { typedef int* ptr; ptr sub; sub = new int[end]; for(int i=start; i<end; i++) { int j = 0; Array[i]=sub[j]; j++; } for(int l=0; l<end; l++)//added as an after thought cout<<sub[l] … | |
Hello [B]Would anyone like to share their tips & tricks for debugging functions & whole programs in C++. [/B] I find I suck at debugging :P & really dont look forward to having to go through my functions again to see if there are any loopholes etc so if anyone … | |
Hello. I've got a program with several StringGrids and need to implement *one* popupmenu for them all. Everything up till now works fine - even the popupmenu's but... When I left-click on the grid the cell changes color ie receives focus. When I right-clck on the grid the popupmenu appears. … | |
WAP to read 'n' numbers and print the biggest and smallest number. Pls help me with this. The program should be done with without using arrays....... | |
Hi, i was trying to use the fstream library to create a programme that serves someworth like a data base i.e it stores some information that will be used in the shortest possible time but the problem is that it does not work for me does any one have an … | |
So, I am sure everybody has been here, but just to describe it properly, a short story: I am writing a (to me) somewhat complicated program. By changing the input parameters I suddenly start getting a run-time error. After several hours of placing more or less meaningful printing-commands around the … | |
I have noticed that there isn't a thread where you are given puzzles. So i going to change that! Your puzzle is to make an exacutable c++ program that outputs "hello world" 20 times (try to be exciting). Rules: it has to be c++ it has to work I look … | |
hi , i saw the following link [url]http://www.cplusplus.com/reference/iostream/manipulators/setprecision/[/url] and tried it in the same way... #include<iostream> #include<iomanip> using namespace std; int main() { float a=3.14; cout<<fixed<<setprecision(4)<<a; } so my output should be:3.1400. but when i execute the above code.. i am getting the error as fixed undeclared.. | |
i have a code to check lexeme is keyword or not: [CODE]void Is_Keyword_Or_Not() { char *keywords[]={"INCLUDE","VOID","MAIN","i","var","cin","cout","if", "then","else","and","or","not","loop","exit","when", "while","until"}; int j=0; flag=0; for (j=0;j<18;j++) //search for keyword & # of keywords = 18. { if (strcmpi(lexeme,keywords[j])==0) { temp.assign(lexeme,INCLUDE); flag=1; break; } } } [/CODE] i have defined macros like: INCLUDE 1 … | |
Hi guys, i'm trying to extract the data "Lady Gaga Fame Monster" from the html below using substr and find, but i wasn't able to retrieve the data. [code=html]<div class="album-name"><strong>Album</strong> > Lady Gaga Fame Monster</div>[/code] I'm tried to extract the whole string first, but i can only extract till <strong>Album</strong> … |
The End.