49,757 Topics

Member Avatar for
Member Avatar for Archit Gupta

#include<iostream.h> #include<conio.h> #include<stdio.h> #include<process.h> struct room { char type[3]; int rmn; int terrif; }; void add(room *,int); void main() { clrscr(); int n,r,modifychoice,c,a,i; room rm[5]; cout<<endl<<endl; while(1) { cout<<"\t\t\t"<<"HOTEL DAVIANS"<<endl<<endl; cout<<"\t\t "<<"MENU FOR HOTEL DAVIANS -"<<endl; cout<<"\t\t"<<"1. Enter rooms record for the hotel "<<endl; cout<<"\t\t"<<"2. Modify rooms records"<<endl; cout<<"\t\t"<<"3. Check …

Member Avatar for Archit Gupta
0
279
Member Avatar for victor tawiah

am to create a program that calculates the marks of unknown number of students in a class and arrange them in an order of merit. pls help

Member Avatar for victor tawiah
0
108
Member Avatar for lewashby

I'M getting a "DateValidation.cpp:10:2: error: ‘numberOfDigits’ was not declared in this scope" error. Here is my call to the function: numberOfDigits = getNrDigits( int date ); The function is declared in the file functions.h and I have #include "functions.h" at the top of my page. Any ideas?

Member Avatar for MIND_HACKER
0
113
Member Avatar for deceptikon

No bells and whistles, just a quickie millisecond timer showing an alternative to the far less portable clock_t method. A test main() is included, just define TEST_DRIVER as a macro or remove the conditional compilation at the end.

Member Avatar for vijayan121
0
7K
Member Avatar for Suzie999

I was testing a portion of new code in a loop, a lot really, as I was just creating it there were a lot of commened stuff, so when I tries to comment the new code it was being an ass, so I just cut it ready to ctrl + …

Member Avatar for Suzie999
0
161
Member Avatar for Weliaz

Hello there DaniWeb! I am currently trying to implement RtMidi into a project of mine, or i am actually currently trying to make the project, but it is highly in need of RtMidi to succeed. (Or just some other MIDI library, with MIDI I/O) When i try to initialize RtMidi …

Member Avatar for Weliaz
0
438
Member Avatar for daino

I'm building a C++ applicaiton and have very little to do with HTML in the past. I'm using wxwidgets at the moment but want to try to use HTML. Is that realistic? With HTML can I build a GUI and use it like a normal GUI or am I missing …

Member Avatar for NardCake
0
122
Member Avatar for alex.mccoy.3386

I am trying to write a program for my class and ran into these errors. I don't know where the issue is and was wondering if any one could help. The project consists of a header, implementation, and source file. These are the errors that I am getting: 1>DivSales.obj : …

Member Avatar for alex.mccoy.3386
0
344
Member Avatar for glenwill101

hello im a hobbyist who is somewhat new to c++ with lots of experience in python. in python i was able to use dictionaries that could be accessed by keys and values with no limits on data types that can be stored but now im trying to port a simple …

Member Avatar for glenwill101
0
3K
Member Avatar for lewashby

In the program below I need to get month to hold the first two digits of date, day two hold the digits 3 & 4, & year to hold the last four digits. Any idea on how I can accomplish that? #include <iostream> #include <string> #include "functions.h" int main() { …

Member Avatar for lewashby
0
411
Member Avatar for dokukani

Is my functions correct? If I type in the highest temp at the bottom row, my program wouldn't take it. Same goes for lowest temp. Can anyone provide some in sight? #include <iostream> using namespace std; //declare constant for array temperature int const row = 3; int const col = …

Member Avatar for remunance
0
356
Member Avatar for deceptikon

C++ conversion of [this C snippet](http://www.daniweb.com/software-development/c/code/445012/simple-interactive-menu) for a simple interactive menuing system. The code shows three files: * menu.h: The header file for the menu class. * menu.cpp: Implementation of the menu class. * main.cpp: A sample driver that uses the library. The menu library is fairly generic in that …

Member Avatar for tinstaafl
2
3K
Member Avatar for lewashby

In the following program, when I enter a number I'M getting strange output back. When I enter 5 I get 0x6011a85 back on the cout << "you entered" line. #include <iostream> //#include "functions.h" int main() { std::cout << "Please enter a number. " << std::endl; int date = 0; std::cin …

Member Avatar for CGSMCMLXXV
0
88
Member Avatar for happyHacker

How do you normalize 16 bit PCM audio 44100Hz mono? I have the raw data, but don't know what to do with it, it is signed as far as I can tell.

Member Avatar for happyHacker
0
151
Member Avatar for amit43

in this code i am counting the number of bits present in the numbers from 1, 2, 3....n i.e the total number of the set bits present in all the numbers till n, what should be the complexlity of this code of mine please any one tell and also how …

Member Avatar for vijayan121
0
120
Member Avatar for <M/>

I enrolled myself into 2 college classes (Java and C++) and i am curious on what the best book is for c++. I saw another thread with the same question, but that was posted 8 years ago. I do not mind paying for any book (price does not matter). If …

Member Avatar for vijayan121
0
220
Member Avatar for jessada.dissopa

I wonder how to interface octave with c++ I already have m-file that can run on octave but I want to run a C++ program that can get/send command from/to octave Anyone can guid me? Is there any link for the tutorial or example code?

Member Avatar for Ancient Dragon
0
304
Member Avatar for lewashby

I need to store the number of digits from a number into a variable. e.g. 538, i need to store 3. How can I accomplish this is C++? Thanks.

Member Avatar for Moschops
0
103
Member Avatar for MiCro0o

I a new c++ programmer, and i started to solve the SPOJ online challenges just practising , and because of my few experiance.. it gives me wrong answers alwayes. See [ **the Challenge** ](http://www.spoj.com/problems/PALIN/) here. My Code : #include<iostream> #include <vector> using namespace std; int reverse(int input) { int last_digit; …

Member Avatar for mitrmkar
0
274
Member Avatar for mefju

Hi This is code: #include <iostream> #include <windows.h> #include <fstream> using namespace std; LRESULT CALLBACK LowLevelKeyboardProc( int nCode, WPARAM wParam, LPARAM lParam); int main() { fstream plik; HHOOK hKeyboardHook =0; plik.open("keys.txt", ios::out); plik.close(); return 0; } LRESULT CALLBACK LowLevelKeyboardProc( int nCode, WPARAM wParam, LPARAM lParam) { KBDLLHOOKSTRUCT *pKbdLLHookStruct = (KBDLLHOOKSTRUCT …

Member Avatar for Suzie999
0
118
Member Avatar for firebird102085

Hi Everyone, I am just starting out so I am sorry for this basic of a question. I have developed the code below to run a very simple program, but, each time the program runs the console window comes up during the program run but closes itself automatically. It should …

Member Avatar for Suzie999
0
330
Member Avatar for Elixir42

Hi, Using Visual Studio 2012. Why does the syntax highlighting turn off periodically. Then unexpectedly it turns back on again, unreproducably, and rather annoyingly. A chocolate eclair for anyone who knows...?

Member Avatar for Ketsuekiame
0
201
Member Avatar for ailyn.damiles
Member Avatar for dureadan

hi i am new in programming.i want to write a function “minesweeper(int, int, int )” that takes 3 arguments a, b, and p and produces an a-by-b Boolean array where each entry is occupied with probability p (e.g. if the randomly generated number is less than or equal to p, …

Member Avatar for Lucaci Andrew
-2
204
Member Avatar for Doogledude123

void drawMap(std::string MapLoc) { char* gridMap[95] [55]; ifstream Map(MapLoc, ifstream::in, ifstream::binary); while (Map.good()) { for(int i = 0; i < 95; i++) { for(int j = 0; j < 55; j++) { if (gridMap[i] [j] == "X") { //Draw Wall glColor4ub(255,255,255,255); glBegin(GL_QUADS); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glVertex2f(10*i,10*j); glEnd(); } else if …

Member Avatar for Doogledude123
0
696
Member Avatar for Feal456

So I am writing a cash register program, person buys items and the number calculates. But I am stuck at looping, I want the user to pick to pick all his/her items first then after all the program is done I want the program to ask if the user wants …

Member Avatar for CGSMCMLXXV
0
3K
Member Avatar for Carolin

This program accepts the name and ID of chess competition contenders. It then randomly assigns a pair of contenders to play against each other. The program predicts the result of each pair by a random result prediction function. The program then continues to pair the winners in the same method …

Member Avatar for CGSMCMLXXV
0
133
Member Avatar for mefju

Hi I have a keylogger code which writes the keys but does not write capital letters and such that:! @ # $% ^ & * () + Someone help me with this? Here is a keylogging code: #include <iostream> #include <windows.h> #include <fstream> using namespace std; ofstream out("plik.txt", ios::out); LRESULT …

Member Avatar for Ancient Dragon
0
240
Member Avatar for prakhs

Hi, Please help me debug this code. I made a Stack template with two parameters: type and size. I am using it two times: first in conversion from infix expression to postfix (here, <char,50> stack is used), then in evaluation of postfix expression (here, <long double, 50> stack is used). …

Member Avatar for prakhs
0
942
Member Avatar for Raisefamous

Hey, I want to build some form application for Windows and i have tryed usind VS2010 but because IntelliSense is disabled for C++ i'm not able to work normaly as i'm fairly new to programming and i need to see the drop out menus after i use the "->" operator. …

Member Avatar for tinstaafl
0
297

The End.