49,761 Topics
| |
I am trying to write an application that will detect all the USB devices connected to my computer. For this I have declared GUID and called the following functions to get the information about devices connected. LPGUID guid; HidD_GetHidGuid(guid); HDEVINFO hDevInfo; hDevInfo = SetupDiGetClassDevs(guid,NULL,NULL,DIGCF_PRESENT | DIGCF_INTERFACEDEVICE); But it give the … | |
I have written a Borland C++ database program some time ago that has been migrated to a new machine running Windows 7 home premium. Errors are showing up that suggest a problem with the relationships between tables ( related records are being mixed up ). When I check the tables … | |
Hi, I'm writing a program that checks parens/brackets/braces if they are paired. Tha catch is I have to write my own stack functions, this is my code so far, it used to work when I was working with just the parentheses, now that I added more options it's not working … | |
I receive this error in a c++ program after moving the program from Mac OS X to windows...I was using XCode, I am now using Visual C++...I looked up the error codfe but don't understand how to apply the solution. Here is the solution as stated by microsoft: A type … | |
Hy all, i'm trying to make an addon for windows explorer. So here is that i want to do: Create in my computer a virtual hard drive which is actually a connection to a FTP server with a user and a password. User can copy with drag & drop, or … | |
Hi, I would like to know the significance of lua methods beginning with an underscore.. for example __init().. Thanks !! | |
I have a pretty basic knowledge of most concepts in C++ save some issues that I have surrounding polymorphism, and I just love the way it feels. But I have my first AS level computing lesson tomorrow, and it will be in Object Pascal. Will this actually be helpful, with … | |
In the S.D.L tutorial that I'm following, a pointer is declared at the start of the program, of type SDL_Surface, and assigned NULL. This is later assigned to TTF_RenderText_Solid(arguments...). Does this mean that SDL_Surface is the base class from which TTF_RenderText_Solid is derived? - I read something about SDL_Surface being … | |
I have to write an application which uses the Vigenere cipher with the Italian alphabet (only 21 characters, excluded J,K,W,X,Y). After a day of trying this is the code that I wrote [CODE] #include "vigenere.h" #include <string> using namespace std; Vigenere::Vigenere(string str){ key = str; key = StringToUpper(key); for(int cnt … | |
Before I get started with this question I would like to point out that this is a small app I am creating to not only learn more C++ coding but also to choose who drives the fifth day in my carpool group for college. I am creating an application in … | |
I was looking for an easy way to define variables for random monster encounters in my game. I'm not sure how to define some without typing out 1000+ lines of code for like 25 monsters. What I was wondering if there was a way to make a config file, or … | |
Here is the question: DECIDE YOURSELF The SuperShop have seven sales assistants. They are paid R55.70 per hour and 1.5 times for overtime. Each sales assistant is also paid 2% commission on his or her sales. The manager of SuperShop wants a C++ program to print the weekly payslips for … | |
Okay, so here's my set of problems: I need a simple error check, so that if the user enters the wrong type of character, he/she will be notified and allowed to re-enter a new value. Secondly, I need some sort of loop that allows the user, after having running the … | |
Issue with how to properly use push_front and pop_front. I have a class named Account I am suppose to be able to be able to add new accounts and new balances but I can't find the proper documentation on how to do this. I am trying to figure out what … | |
okay i came up with some code that reads in a file, and on the file are names of shapes and their widths/lengths. after the file is read in, it tokenizes whats in the file, it then calculates what shape it is and then takes the information and calculates the … | |
Dice Rolling Write a program that simulates the rolling of two dice. The program should use rand to roll the first die and should use rand again to roll the second die. The sum of the two value should then be calculated. [Note: Since each die can show an integer … | |
can someone tell me how can i read data from text files line by line and store it on a variable. example: here is my the data in my textfile. example.txt Username: blahblah Password: wewewe my problem is how can i get the blahblah and wewewe and store it in … | |
I have a main c++ file with all my integer values, then I have a seperate c++ file with my algorithms for my battle function. May seem like a simple question, but how do I get the values from my main c++ file and use them in the other one … | |
I'm obviously a noob @ c++. Have a question. is there any way i can restrict user to input only numeric value and make a loop if user enters non-numeric value. for example for conversion from kilo to pound if user enters some garbage like "afshdgafg" in cin. is there … | |
I am trying to simplify Maven to use one POM to do both a 64 bit build and a 32 bit build. I have tried to separate the build into two separate executions however I am required to set the compilerExecutable tag specified by the maven-native-plugin to point to either … | |
This is a simple one, but don't know why it won't work. Question VALUE RETURNING FUNCTIONS WITH ONE OR MORE VALUE PARAMETERS The pupils of the Annandale High School have to pay a fee for each extramural activity that they want to partake in. These activities include sport, and other … | |
I am trying to determine the time complexity (and space complexity if anyone would like to have a go at it) of a sort function i implemented with a custom comparator. it is the sort function from the STL <algorithm>. First off, I am using Visual C++, so I am … | |
[CODE]#include <iostream> #include <conio> void main() { int n; cout<<"Enter value of n:"; cin>>n; if(n>=0)&&(n<=10) { { if(n==0) Zfactorial=1; cout<<"/t/tThe value of Zfactorial for n"<<Zfactorial; else(n>0)!!(n<11) for(int n=0;n<11;n--) Zfactorial=Zfactorial*(n); cout<<"/t/tThe value of Zfactorial for n"<<Zfactorial; } else cout<<"Invalid value of n"; continue } getch(); }[/CODE] [B]question[/B] Professor Zoe has come … | |
Hello, I have been given an h file. Below is a section of the h file, with the entire h file below it. I am trying to figure out how to invoke the section directly under this message. [CODE]template <class T> ostream& operator << (ostream& os, const List<T>& s) // … | |
please help me i m having problem for making this program First Part: (Using Structures) Create a structure called Complex for performing arithmetic with complex numbers. Complex numbers have the form realPart + imaginaryPart * i where i = √(-1) Use floating point data to represent members of structure (i.e. … | |
Hi, I wrote part of a program in visual c++, but I use dev c++ at school, so I tried just copying my code: [CODE]char mainmenu[50]; char game[50]; int strength; int intelligence; int dexterity; int health; int mana; int damage; int defense; int k; int roll; int experience; int levelup; … | |
Hello Everyone I Have Been Learning C++ For The Past 1 Year :D , So With This Much Experience Can I Make or Modify A Bootloader in C++ Paradon Me For My Bad English Any Replies Would Be Greatly Appretiated | |
I have this code: [CODE]#include <iostream> using namespace std; int main() { enum foxtrot {green, yellow, red}; foxtrot colorSelect; cout << red << endl; [COLOR="Red"]cin >> colorSelect;[/COLOR] cout << colorSelect << endl; } [/CODE] Line 10 gives me the result 2 as expected, but line 11 gives me a compile … | |
Hello, I am not sure why, when I call my method, it goes into a continuous loop and prints out nothing. The operator - method is suppose to be able to subtract a Date object and a Date argument. I will clarify if anything needs clarifying, thanks for the help … | |
I having problem of sizeof returning a hexadecimal value which I want it return decimal here is my sample code: [CODE]#include <cstdlib> #include <iostream> #include "stringCascade.h" using namespace std; void StringCascade (void) { unsigned char ucA[] = {0x02, 0x6F, 0x09, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0x00, … |
The End.