49,761 Topics

Member Avatar for
Member Avatar for saraaw

An integer double-dimensional array called hotel is used to keep track of reservations in an hotel of 5 floors each floor having 8 rooms. The floors are numbered 1, 2, 3, 4, and 5, and the rooms are numbered 1, 2, 3… 8. Write a C++ program to manage the …

Member Avatar for Doogledude123
0
351
Member Avatar for Suzie999

Hi, I'm trying to create a *link like* label in a win32 application. VS2010 I generally find an API I can use but I'm having no luck with it currently. Just wondering if anyone has some Ideas? just a starting point will be great. Appreciate you reading, thanks.

Member Avatar for Suzie999
0
195
Member Avatar for herge

Hi Everbody: To get rid of specific warning in 2008 vc++ or 2005 vc++ 1>c:\documents and settings\user\my documents\visual studio 2008\projects\gmt\gmt\gmt.cpp(25) : warning C4996: '_gmtime64': This function or variable may be unsafe. Consider using _gmtime64_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio …

Member Avatar for deceptikon
0
229
Member Avatar for deceptikon

For those of you familiar with the latest C++ standard, what do you think of [uniform initialization](http://en.wikipedia.org/wiki/C%2B%2B11#Uniform_initialization)? Listening to folks like Herb Sutter, it seems like the intended purpose is to be completely pervasive, which obviously changes the look and feel of C++. Do you plan on using it everywhere …

Member Avatar for vijayan121
0
419
Member Avatar for Honeymaid

[LEFT]okay, I've got a connect four, 2 player, console game due today, and I've got everything pegged down except for checking for a win, I've tried multiple things, ifs, whiles, fors, and I only have around 5 weeks of experience in C++, with around 15 hrs of class every week. …

Member Avatar for Choro
0
2K
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
281
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
443
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
417
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
155
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
275
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

The End.