49,761 Topics

Member Avatar for
Member Avatar for javaconfused

The Demetris Leadership Center publishes the books, DVDs, and CDs listed in the following table: Title: Description Product Number Unit Unit Sold Brave New World Book 110 25.50 925 Lady Gaga CD 111 16.00 275 The Forgotten DVD 112 24.50 289 Twilight DVD 113 45.50 135 The Giving Tree Book …

Member Avatar for Clinton Portis
0
349
Member Avatar for computerages

Hello, DaniWeb, I am writing a C++ program that would output all folders/files including the hidden ones in a directory. I ask the user for dir address, and I use the following instructions to execute the job: [CODE] string cmd; string dirAddr; cin >> dirAddr; cmd.insert(0, "dir /ah "); cmd.insert(cmd.size(), …

0
66
Member Avatar for spiriad

Hello there, I have the following situation : I have a moving ball in a rectangular 2D chamber. When the ball touches the walls of the chamber it changes it's direction. It is simple to implement the ball movement when the chamber is empty ( it has only 4 walls). …

Member Avatar for spiriad
0
112
Member Avatar for reversed

I'm fairly new to pointers and are having problems with the char* words[] part of this program. It's all fairly simple [CODE] #include <iostream> #include <iomanip> using namespace std; void getString(char* string, int max_length); void getWords(char *orig_string, char* words[], int* word_length, int& wc); void displayInfo(char* orig_string, char* words[], int* word_length, …

Member Avatar for Clinton Portis
0
115
Member Avatar for mybluehair

I've got a library that is annoying me. When I command it to do what I need it to do, it spits out a bunch of text onto the screen that I don't need. Is there a way to temporarily "mute" a console program, then re enable it later? This …

Member Avatar for mybluehair
0
241
Member Avatar for StaticX

Hi, i am making a program that contains an integer array of an unknown size.The user is prompted to enter numbers into the array,and press 'x' to exit. What i am going to do then,is to pass the array from the main into a class which contains another array,but before …

Member Avatar for VernonDozier
2
124
Member Avatar for DawnOfIkaros

Hi! I'm new to C++, been through the basics, and now I'm attempting to make a small console rpg-game where I want my stats (level, xp and such) to be saved in a file. I've successfully saved them into a txt-file, but how do I open it? I don't need …

Member Avatar for DawnOfIkaros
0
98
Member Avatar for Tales

Hello, can anyone help me to finish this code? [CODE] ref class data_XML{ private: int service_code; wchar_t* name; wchar_t* address; wchar_t* phone; wchar_t* fax; wchar_t* web_page; wchar_t* city; wchar_t* additional_info; wchar_t* specialty; wchar_t* sub_specialty; data_XML^ next_XML; public: // Constructor data_XML(void){}; void next(data_XML^ next){ this->next_XML= next; } virtual String^ ToString() override{ …

0
62
Member Avatar for mrPaul

Hello daniweb peeps, been learning c++ from a beginners book for the past week or two but have got myself a bit confused, follows is the code that compiles but isn't doing what i want it to (Im hoping the fault is obvious!) [code] #include <iostream> using namespace std; int …

Member Avatar for mrPaul
2
106
Member Avatar for Lukezzz

I am creating a File and at the same time writing 3 lines to this file and then closing the file. What I wonder is if the fileSystemWatcher has any event that detects when I have done exactly this operation and closed the file. I want the filesystemwatcher to react …

Member Avatar for Lukezzz
0
84
Member Avatar for bigmaq

Hi, so I have put up two posts in the last day on this program. I am quite new at this concept of Heaps and Heap Sort and I have done a lot of work figuring this out, but i am very close to getting it. I do have my …

Member Avatar for bigmaq
0
173
Member Avatar for richman0829

Everything below works the first time through, and the validation of the user's choice to proceed or not works, as does his choice to quit; but when it gets to cin.getline it just blows right through it without waiting for input. As my parents used to say, Where have I …

Member Avatar for Clinton Portis
0
209
Member Avatar for johnyjj2

Hello :-)! [quote]SUMMARY: How to run pocketsphinx_continuous on mobile phone with Symbian, and how to do it with simulator of mobile phone with Symbian. PocketSphinx can be downloaded for free here, for both Linux and Windows: [url]http://cmusphinx.sourceforge.net/html/download.php[/url] .[/quote] ------------------------------------------------------------------------------------------------------------ SHORT EXPLANATION I'd like to create application for mobile phone and …

2
241
Member Avatar for skeet123

Almost got this program to work. Still have one error but not sure how to fix. It is using a linked list class for storing nodes. Here is the code: [CODE]// functions use by main void mergesort(linked_list& list); // Merges sorted list dl1 and dl2 into a sorted list dl …

Member Avatar for Noumi
0
136
Member Avatar for Mafia619

Hey, I've got an assignment from my computer teacher in school. I've got to make a program that displays the prime numbers in a range and also display the number of prime numbers that are present. And i'm only supposed to use the basic header files.....that means the program should …

Member Avatar for VernonDozier
0
299
Member Avatar for Stefano Mtangoo

Hi all, I have a question here :) Suppose I have a library in source code form (Let say [URL="http://tangentsoft.net/mysql++/"]mysql++[/URL]) and I have built it, and now I have the files (.h, .lib, .dll). How do I combine them in project? I use [URL="http://www.codeblocks.org"]code blocks[/URL] Why I ask? Because [URL="http://www.python.org"]Python[/URL] …

Member Avatar for Stefano Mtangoo
0
188
Member Avatar for Perham

Hi, I'm writing a class that controls Bitmap I/O. here's the working code: [CODE] #ifndef __linux__ #include <windows.h> #endif #include <stdio.h> // Our functions class FEN { int not_defined_yet; }; class fileBITMAP { public: BITMAPFILEHEADER file_header; BITMAPINFOHEADER info_header; RGBTRIPLE* image_data; fileBITMAP (int width, int height); int writetodisk(FILE* handle) { printf("writing …

Member Avatar for Intrade
0
105
Member Avatar for new programer

I need to enter 10 students names I did a loop but it does not work well [CODE]# include <iostream> # include <string> using namespace std; //functions prototype void avg (double& average); char grade(double& average); int main() { // String variable for the student's name string name; double theAverage = …

Member Avatar for jonsca
0
143
Member Avatar for denizen08

[CODE=C++]polynomial polynomial :: derivative(void) { polynomial outpoly; outpoly._coef = new double [_degree]; outpoly._degree = (_degree-1); for(int i=0; i<(_degree); i++) { outpoly._coef[i]=(i+1)*_coef[i+1]; } return outpoly; } //header: #pragma once #include <complex> #include <iostream> #include <string> #include <sstream> using namespace std; class polynomial { private: double * _coef; int _degree; public: // …

Member Avatar for Narue
1
165
Member Avatar for scriptkiddy

Hi, I heard that I can see how VC++ 6.0 converts my C++ code to assembly so I can rewrite it in assembly while removing useless junk. Could somebody tell me how this would be done? Well, guess ill just use ollydbg to see how my programs converted

Member Avatar for Ancient Dragon
0
226
Member Avatar for nunchuckie

quick description: f(n)=n/2 if even f(n)=3*n+1 if odd with given start value it can step back and forth between the two eqtns. Example: f(7)=22, f(22)=11, f(11)=34, f(34)=17 You enter two start values. first and last start value and the program should generate all values in between. With a given max …

Member Avatar for mrnutty
0
152
Member Avatar for anbuninja

can anyone tell me why my output gives me - numbers? [code] #include <iostream> #include<iomanip> using namespace std; void getEmployeeData(int [ ], char [ ], int [ ], int); void displayEmployeeInfo (int [ ], char [ ], float [ ], int); float calculateGrossPay (char [ ], int [ ], float …

Member Avatar for jonsca
0
107
Member Avatar for turtlez

Hello, This is what i need: I have a php file on my website ([url]http://example_site.com/php_file.php[/url]) ((and no, that isn't the actual site)) And i have some C++ knowledge. Now how can i get C++ to send a variable (eg: name) to my php file. ((Client -> Server)) I have no …

Member Avatar for turtlez
0
112
Member Avatar for turtlez

Hello, i need help with a basic code issue, i ave posted the code [URL="http://turt2live.zxq.net/cpp/hoomin.html"]here[/URL] because it is too long to post... The issue occurs in this section of code: ...(more before) void getInput(int num){ char = one[1]; char = two[1]; char = three[1]; char = four[1]; ...(more after) saying …

Member Avatar for turtlez
1
119
Member Avatar for Ahmad Shaheen

Write C++ program to do the following: • Define a Double Linked Lists EmpRank where the data should be of type integer. • Enter 10 Employee Ranks, where each rank should be inserted in EmpRank with respect to its value as ascending order its ordered • Print out the EmpRank …

Member Avatar for Clinton Portis
-1
149
Member Avatar for Dewey1040

So this is just the beginning of my questions, but I'm seriously having problems using classes in C++, I'm writing a program right now to plot points using asterisks on a 40 by 40 plain. right now I'm just trying to write the .h for the point class and i …

Member Avatar for sfuo
0
139
Member Avatar for kryz

I'm confused with pointers. I'm not sure how to get the vowels to show up in Case A. Also, I would need help by how to get the program to run again after case A instead of ending the program after each case. Should it be in if/else statement instead …

Member Avatar for Clinton Portis
0
782
Member Avatar for reese27

I have two vectors--one with the name of the class and one with the abbreviation of the class. The name of the class is in the same position of the abbreviation in the different vectors. I want to make it to where if I input "AERO" the output should be …

Member Avatar for Ancient Dragon
0
35
Member Avatar for Tales

I built a Visual Studio 2008 VC++ project, dialog based using HTML. In my HTML I have: [CODE] <form name="loadExcel"> Choose the file which contains the information:<br /> <input type="file" name="myFile" value="Search" id="myFileInput" /><br /> <input type="button" class="Upload" name="loadExcel" title="Import" id="loadExcelButton" /> </form> [/CODE] The user is supposed to browse …

Member Avatar for Tales
0
268
Member Avatar for kangekraam

I am trying to print the corresponding Unicode character for alt+2 to the Windows console window. (the console doesn't display the character, but should display ^B instead) The following doesn't seem to work. Just prints "2". keybd_event(VK_MENU,0 ,0 , 0); //Alt Press Sleep(10); keybd_event(VK_NUMPAD2,0, 0 , 0); // 2 Press …

Member Avatar for kangekraam
0
95

The End.