49,760 Topics

Member Avatar for
Member Avatar for Your_mum

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 …

Member Avatar for Your_mum
0
210
Member Avatar for PixelExchange

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" …

Member Avatar for group256
0
161
Member Avatar for Hektzu

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] { …

Member Avatar for Hektzu
0
106
Member Avatar for enkidu75

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 …

Member Avatar for enkidu75
0
96
Member Avatar for shahanakazi

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 …

Member Avatar for shahanakazi
0
90
Member Avatar for algoexpert

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.

Member Avatar for Kakashi Hatake
0
138
Member Avatar for mahdir24

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 …

Member Avatar for mahdir24
0
134
Member Avatar for indr

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 …

Member Avatar for Luther von Wulf
0
115
Member Avatar for romilnagrani

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..

Member Avatar for mike_2000_17
0
134
Member Avatar for Dazaa

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 …

Member Avatar for mike_2000_17
0
142
Member Avatar for cgcgames

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. …

0
83
Member Avatar for watery87

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 …

Member Avatar for watery87
0
77
Member Avatar for mhelal

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, …

Member Avatar for swatithakur
0
209
Member Avatar for King_Alucard

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 …

Member Avatar for VernonDozier
0
460
Member Avatar for mrkaran

how can i create a parse tree if i am using recursive descent parser G->ET like g() {E();T(); }.....

Member Avatar for Rashakil Fol
0
44
Member Avatar for Sismetic

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 …

Member Avatar for PixelExchange
0
240
Member Avatar for captainSheepdog

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 …

Member Avatar for captainSheepdog
0
97
Member Avatar for dflatt

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] …

Member Avatar for dflatt
0
88
Member Avatar for gretty

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 …

Member Avatar for Dingbats
0
153
Member Avatar for Dingbats

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. …

0
44
Member Avatar for Nandu Das

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.......

Member Avatar for NathanOliver
0
194
Member Avatar for denguru4

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 …

Member Avatar for denguru4
0
69
Member Avatar for miturian

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 …

Member Avatar for miturian
0
148
Member Avatar for yup790

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 …

Member Avatar for mrnutty
0
219
Member Avatar for indr

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..

Member Avatar for Ancient Dragon
0
183
Member Avatar for vbx_wx
Member Avatar for mrkaran

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 …

Member Avatar for mrkaran
0
85
Member Avatar for clement99

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> …

Member Avatar for clement99
0
718
Member Avatar for indr

hi i am trying to use setw with a string.. here is my code.. [CODE]string a="hello"; cout<<setw(10)<<a;[/CODE] i inserted string header and iomanip header files... now my output should be with a few number of blank spaces and then it should print hello.. but its not working for me... could …

Member Avatar for indr
0
440
Member Avatar for sangoku

Hy i Know it is not on English but could somone take a look on my code and tell me what I am doing wrong.... [CODE] #include <iostream> #include <fstream> //ukljucujemo cstring biblioteku koja omogucava napredne operacije sa stringovima #include <cstring> using namespace std; #define VELICINA 40 //fixsno definisemo vlisicinu …

Member Avatar for sangoku
0
334

The End.