51,593 Topics

Member Avatar for
Member Avatar for khorght

Hi to all. I'm trying to use hidapi.dll,if needed i'll post a sources or link to authors page. Here's what i've have in my dll: #define HID_API_EXPORT __declspec(dllexport) #define HID_API_CALL ... int HID_API_EXPORT HID_API_CALL hid_write(hid_device *device, const unsigned char *data, size_t length); ... and this is the part in c#: …

Member Avatar for Nidal_1
0
921
Member Avatar for overwraith

I just glued together two codes I found online, and found an interesting result. Some of my flash drives have been appearing twice on the system. Here is what the output looks like: Drive: C:\ Volume Name: Drive: D:\ Volume Name: Drive: E:\ Volume Name: Drive: F:\ Volume Name: Drive: …

Member Avatar for overwraith
0
223
Member Avatar for Subhadeep_1

I **want to draw a magnifying glass using <graphics.h> ** in Turbo C++ (a DOS-based compiler for C++), which is mostly user as "Search" icon. But, I am having problems in making the rectangle attached to the two circles (one inscribed on another). I've also included the screenshot (made in …

Member Avatar for Subhadeep_1
0
499
Member Avatar for overwraith

Hello, I was doing some research on enumerating the different drives on a system, and I found some code on MSDN. Here is the page: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364975%28v=vs.85%29.aspx The source code looks like this: DWORD dwSize = MAX_PATH; char szLogicalDrives[MAX_PATH] = {0}; DWORD dwResult = GetLogicalDriveStrings(dwSize,szLogicalDrives); if (dwResult > 0 && dwResult …

Member Avatar for overwraith
0
266
Member Avatar for overflowh

Hi there! I'm having a little (really not so little) issue using iterators. // object t1 created here. std::vector<std::string> *f1_t1 = t1.func1(); std::vector<std::string>::iterator iterv; for (iterv = f1_t1->begin(); iterv != f1_t1->end(); ++iterv) std::cout << *iterv << " "; std::cout << std::endl; std::vector<std::string> *f2_t1 = t1.func2(); for (iterv = f2_t1->begin(); iterv …

Member Avatar for mike_2000_17
0
412
Member Avatar for FC Jamison

How would I write a C++ class of which only one can be created ever be instantiated in any program. I know that ClassName* objectName = new ClassName(); instantiates an object, but how would I make it so when you try to instantiate it more than once you still end …

Member Avatar for rubberman
1
6K
Member Avatar for mara.pradia
Member Avatar for ??!!

hey guys i just need someone to help me out in parts (c) and (d) of the following question: a- Implement the function f(a,x)=sin(ax)/x. (the prototype is double f1(double a, double x). Note that this function is equal to a for x=0. (6 points) b- Write a code that asks …

Member Avatar for shvmgyl15
-1
164
Member Avatar for Lp_baez

I am currently learnning c++ from a text book. but I have come accross an error when trying to run the program. The error reads like this: fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source code? …

Member Avatar for Lp_baez
0
387
Member Avatar for TheTimeCat

Hi everyone - I hope your day is going great. Can someone please kindly help me with the coding of the following function - I have absolutely no clue where to start - Given the following sets of numbers - 1154 1179 2154 2554 2484 2144 4515 1144 1517 4815 …

Member Avatar for TheTimeCat
0
167
Member Avatar for Karan_4

Please Explain me the code A a = b as A; Iam confused with it public class A { public virtual void One(); public void Two(); } public class B : A { public override void One(); public new void Two(); } B b = new B(); A a = …

Member Avatar for ddanbe
0
102
Member Avatar for Pilot122x

Alright guys I need some assistance with this. Ok In a few days I will start my project but I need to how to do something, Read Below: I need to find out how to display a Users specific table within My MySQL database for example here is a picture …

Member Avatar for Pilot122x
0
274
Member Avatar for johans22

#include <iostream> typedef struct _elems { int a; int b; int c; }elems; static elems eArray1[]={{5,9,13}, {12,22,1}, {2,3,4},{4,3,1}}; static elems eArray2[]={{23,121,55}, {88,23,90}}; eArray1 and eArray2 can have different sizes such as 1x3, 2x3, 4x3, 5x3, etc.How to combine these ,eArray1 and eArray2, into a structure called eArray and loop and …

Member Avatar for Ancient Dragon
0
146
Member Avatar for laurel.jackson.12

#pragma once namespace Hardware_Store { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; /// <summary> /// Summary for Form1 /// </summary> public ref class Form1 : public System::Windows::Forms::Form { //array variables private: array<String^>^itemNoA; private: array<String^>^descriptionA; private: array<int^>^noStockA; private: array<double^>^priceA; public: …

Member Avatar for gusano79
0
285
Member Avatar for kvahanyan

Hello people, I want create and use a simple library but this is the first time, so I need help. 1. If I have cpp file with it's header, how do I create a shared library with g++. 2. After I created the .so library, how do I include it …

Member Avatar for vijayan121
0
236
Member Avatar for waqas.zafar.125

Hi there! I have a question related to filing in c++. I have to read data from a text file and load it into 2-d dynamic array. Here is the problem statement: 5 3 3 8 1 4 2 5 7 2 4 6 8 0 9 3 1 2 …

Member Avatar for Kanoisa
0
165
Member Avatar for shadyreal

A bit of background information: Im running Windows Server 2008 R2 Standard, on a virtual server. The program is a service with a service installer. The service has a couple of performance counters to show the data performance. To be able to do this I need to create a category(I …

0
82
Member Avatar for ??!!

Hey guys i really need someone todo the following it's urgent: Declare and initialize a dynamic array of rectangles. Define an array of pointers to the array of rectangles and use it as search index by area. Define two other similar indexes to facilitate search by length and width.

Member Avatar for mike_2000_17
-1
239
Member Avatar for Labdabeta

Hello, I made an arbitrary precision integer library a few weeks ago. It works well, but is bounded by `256^(8*sizeof(size_t))` because it uses a simple dynamically allocated array to do its work. I want some way to have theoretically unbounded storage. I think that file io is probably best, but …

Member Avatar for Labdabeta
0
213
Member Avatar for Suzie999

I'm running this code. SHELLEXECUTEINFO ExecuteInfo = { 0 }; ExecuteInfo.cbSize = sizeof(ExecuteInfo); ExecuteInfo.fMask = 0; ExecuteInfo.hwnd = nullptr; ExecuteInfo.lpVerb = L"open"; ExecuteInfo.lpFile = L"C:\\progra~1\\intern~1\\iexplore.exe"; ExecuteInfo.lpParameters = L"http://www.google.co.uk"; ExecuteInfo.lpDirectory = nullptr; ExecuteInfo.nShow = SW_SHOW; ExecuteInfo.hInstApp = nullptr; ShellExecuteEx(&ExecuteInfo); Sleep(5000); CloseWindow((HWND)ExecuteInfo.hwnd); exit(GetLastError()); It's not closing the window. And it's exiting with …

Member Avatar for Suzie999
0
1K
Member Avatar for laurel.jackson.12

Problem 1: When I need to display my zipcode, I get zipcode and city. Problem 2 : When I enter zipcode I get zipcode not found. This my zipcode and city 60561 Darien 60544 Hinsdale 60137 Glen Ellyn 60135 Downers Grove #include <iostream> #include <string> #include <fstream> using namespace std; …

Member Avatar for tinstaafl
0
149
Member Avatar for 2384443

plzz help me with this program #include<iostream.h> #include<conio.h> int sum(int s); int sum(int x); int sum(int j,int k); float sum(float p,int q); float sum(float y,float z); void main() { cout<<sum(0)<<"\n"; cout<<sum(3)<<"\n"; cout<<sum(6,7)<<"\n"; cout<<sum(5.5,8)<<"\n"; cout<<sum(4.9,3.5)<<"\n"; getch(); } int sum(int s) { return s; } int sum(int x) { return x; } …

Member Avatar for richieking
0
142
Member Avatar for soche123

![729809d51c75da2de9381dc33f42887d](/attachments/large/4/729809d51c75da2de9381dc33f42887d.jpg "729809d51c75da2de9381dc33f42887d") okay guys this the program in which we have to add a record,modify it or delete it. it adds and shows it successfully but whenever we want to delete a record it doesn't. When we add to records and delete the second one ,the list looks like this,

Member Avatar for tinstaafl
0
707
Member Avatar for team_ferrari22
Member Avatar for senadfok
0
194
Member Avatar for eldiablo1121

Hello everyone I have pretty lengthy code here, i think I may need to place all the code, but all I need is one one thing, it's pretty much done: #include <iostream> #include <iomanip> #include <string> #include <ctime> using namespace std; // Function prototypes void BuildDeck( int deck[], const int …

Member Avatar for eldiablo1121
0
2K
Member Avatar for J-P1988

Hey! On Qt, i created an QList<QLabel*> but when i try to access or modify it in later functions i get: Démarrage de C:\Projet QT\Text Based RPG\build-textbasedrpg-Desktop_Qt_5_1_0_MinGW_32bit-Debug\debug\textbasedrpg.exe...ASSERT failure in QList<T>::operator[]: "index out of range", file ..\..\..\Qt\Qt5.1.0\5.1.0\mingw48_32\include/QtCore/qlist.h, line 460 Invalid parameter passed to C runtime function. Invalid parameter passed to C …

Member Avatar for J-P1988
0
885
Member Avatar for annitaz

Provide three menu options to format the text entered in QTextEdit to (1) display the letters in capital letters (2) display the text in red (3) align the text in the center I did the 2nd and the 3rd part but I can't find the capital letter part if (name …

Member Avatar for triumphost
0
157
Member Avatar for lewashby

In the following program I'm trying to set the first, second, & third character values stored in processTheseThree [0], [1], & [2] to the int values D1, D2, & D3. When I tested my code with the line `std::cout << processTheseThree[firstSecondThird] << std::endl;` I was getting the correct values but …

Member Avatar for vijayan121
0
231
Member Avatar for dirtydit27

I have a questions about classes in C++. I'm working on a homework assignment where I have a class called Person and a derived class called Doctor. I also have two other classes that are called Date and Bill. I'm suppose to create a class drived from Person and call …

Member Avatar for tinstaafl
0
268
Member Avatar for mesbahuk

I'm currently working in a java to c# conversion project. In one part I got this Java code snippet. public CustomType someMethod(Message msg) throws IOException { byte[] data = msg.toString().getBytes(); } to my understanding, data contains the byte representation of the string *msg.toString()* But when I try to write it …

Member Avatar for mesbahuk
0
266
Member Avatar for ??!!

Hey guys i'm new to this forum ;so here's the thing i need help with my code. I am required to : Add to the class EECE230Student a private static variable which is used to count the number of objects generated. For this purpose, you need to perform the following: …

Member Avatar for phorce
-1
254
Member Avatar for lewashby

// Array for one's place char arrayOnes[10] = {"", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"} In the code above I'm having trouble declaring this array. I either get > error: too many initializers for ‘char [10]’

Member Avatar for mike_2000_17
0
181
Member Avatar for rofln

Hello, I have to submit a makefile along with my source code for a project in my data structures class. I have never done this before, so I had to do a lot of Googling. Needless to say, I have successfully created a makefile and ran it, but I have …

Member Avatar for rofln
0
129
Member Avatar for Labdabeta

I quickly threw together a drawing program in SDL and I am having a couple of issues with lag. The program lags really hard when the size is larger than about 700x700 pixels, and I cannot find anything other than a couple of SDL_BlitSurface calls to the 'image' surface in …

Member Avatar for Labdabeta
0
209
Member Avatar for efe.ozyer
Member Avatar for Suzie999
0
176
Member Avatar for nathan.pavlovsky

Hello Programmers! I am making a program that demonstrates the difference between passing by value to a function and passing by reference. My code is below: #include <iostream> using namespace std; int squareByValue(int); void squareByReference(int&); int main() { int x=2; int z=4; cout << "x= "<<x<< " before squareByValue"<<endl; cout …

Member Avatar for nathan.pavlovsky
0
207
Member Avatar for rajesanthu

[B]Simple C++ program for billing[/B] NB:Excuse me experts,,,,,This is only for beginners 1.copy and paste the program in a notepad 2.save the textfile with .cpp extension 3.select file type all 4.cut the textfile and paste it in your bin folder where turbo c is located 5.open turbo c and open …

Member Avatar for Monu_1
-4
10K
Member Avatar for Dashien

Hello All; I'm not a student nor is this a project I am beginning a programming project of my own and redoing some of my personal lessons to refresh my understanding of C# and I couldn't believe how rusty I am until I hit this issue...... using System; using System.Windows.Forms; …

Member Avatar for deceptikon
0
264
Member Avatar for Echo89

OK, I've taken advice from some members here, and members from another forum. And I've come up with this, thouht I'd just share it with you.

Member Avatar for dexblack_1
0
226
Member Avatar for marcelopb90

HI! I really need a simple C++ programe that calculate the pi by de sequence 4 - 4/3 + 4/5 - .. with a 0,0001 precision. Thanks!!!

Member Avatar for tinstaafl
0
77
Member Avatar for MasterHacker110

Every time I want to write an encryption program, say RSA algorithm. I have to re - invent the wheel and design the key generation and all those small things my self. Now latly I heard abou AES algorithm and that it is so secure and a lot more stuff. …

Member Avatar for MasterHacker110
0
234
Member Avatar for MasterHacker110

I wrote a very simple encryption program, well the algorithm is simple but there is one thing I am strugling with. Basicly after the user's key is generated the program will write it to a file. Then when the user want to decrypt the encrypted file, the file with the …

Member Avatar for MasterHacker110
0
202
Member Avatar for alaba81

#include <iostream> #include <conio.h> #include <Windows.h> using namespace std; int drying_revolution(int dryingspin_revolution); int rinsing_revolution(int rinsingspin_revolution); int main() { enter: cout << "...CHOOSE YOUR DESIRE WASHING MODE...\n"; cout << "ENTER 'a' for cotton mode\n"; cout << "ENTER 'b' for Quick wash\n"; int temperature_sensor = 0; //reading from the temperature sensor console …

Member Avatar for Vincentas
0
133
Member Avatar for no_one16

Hi.. Im new here and im in 10 grade .. We have our T.L.E its cumputer programing. And because im new in programing i dont really have any idea about this thing so if anyone can know how can i understand and answer my assignment i really appreciate it . …

Member Avatar for kvahanyan
0
154
Member Avatar for Abhinisha
Member Avatar for Vincentas
0
152
Member Avatar for Abhinisha
Member Avatar for hackoman96

is data structure (algorithms )related to mathematics like ) - sets ,matrices ,sequence and series , or logical maths related topics ?? and is there any differnce between data structure and data representation??

Member Avatar for Abhinisha
0
161
Member Avatar for Abhinisha
Member Avatar for kvahanyan
0
88
Member Avatar for kvahanyan

Hello people, I am trying to set up a simple soap client to [this](http://www.strikeiron.com/product-list/tax-currency/foreign-exchange-rates/) web service with gsoap. Code generated with soapcpp compiles and works fine but I cannot seem to successfully get data from service. This service uses soap_header to check user login and password. std::string login = "somelogin"; …

Member Avatar for kvahanyan
0
657
Member Avatar for Abhinisha

The End.