49,761 Topics

Member Avatar for
Member Avatar for anderson

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 …

Member Avatar for shazzzz...
0
961
Member Avatar for kodak

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 …

Member Avatar for kodak
0
158
Member Avatar for garu525

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 …

Member Avatar for garu525
0
165
Member Avatar for paulmcco

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 …

Member Avatar for paulmcco
0
538
Member Avatar for axwell

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 …

Member Avatar for axwell
0
124
Member Avatar for kartik14

Hi, I would like to know the significance of lua methods beginning with an underscore.. for example __init().. Thanks !!

Member Avatar for kartik14
0
309
Member Avatar for Jiggle

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 …

Member Avatar for Jiggle
0
85
Member Avatar for Jiggle

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 …

Member Avatar for Jiggle
0
225
Member Avatar for robdb

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 …

Member Avatar for raptr_dflo
0
422
Member Avatar for NetJunkie

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 …

Member Avatar for mrnutty
0
197
Member Avatar for valestrom

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 …

Member Avatar for mike_2000_17
0
239
Member Avatar for Vusumuzi

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 …

Member Avatar for Ketsuekiame
0
90
Member Avatar for Desh2350

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 …

Member Avatar for Ketsuekiame
0
250
Member Avatar for HelpStudents

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 …

Member Avatar for tajendra
0
383
Member Avatar for rjcenteno

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 …

Member Avatar for rjcenteno
0
180
Member Avatar for micheal Amirul

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 …

Member Avatar for WaltP
0
167
Member Avatar for hacknayan

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 …

Member Avatar for NathanOliver
0
106
Member Avatar for valestrom

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 …

Member Avatar for valestrom
0
77
Member Avatar for parth27987

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 …

Member Avatar for parth27987
0
235
Member Avatar for Satyrn

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 …

Member Avatar for Satyrn
0
393
Member Avatar for Vusumuzi

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 …

Member Avatar for Mouche
0
249
Member Avatar for Coffee_Table

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 …

Member Avatar for Narue
0
599
Member Avatar for imraan1992

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

Member Avatar for gusano79
1
99
Member Avatar for coolbeanbob

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

Member Avatar for coolbeanbob
0
198
Member Avatar for Rizi004

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

Member Avatar for Narue
0
512
Member Avatar for valestrom

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

Member Avatar for Fbody
0
201
Member Avatar for Hayzam Sherif

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

Member Avatar for Hayzam Sherif
0
178
Member Avatar for crapgarden

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 …

Member Avatar for ashishseo
0
206
Member Avatar for srednakun

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 …

Member Avatar for tkud
0
153
Member Avatar for murnesty

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

Member Avatar for tajendra
0
134

The End.