49,757 Topics

Member Avatar for
Member Avatar for hcoyle545

Hi, first of all i'm sorry I didn't include details about the problem i'm having in the title but it feels hard to explain without a wall of text & code for reference, plus the question I have to do for context. **Question** (inb4 dwight schrute) A class called 'sample' …

Member Avatar for phorce
0
275
Member Avatar for james.price.39501

How do I open a Form using a Combobox In C++? How do I open a Form using a combobox? If I have 3 Values such as apples, oranges and I want to open a form if the user choses apples and another form if the user choses oranges. private: …

Member Avatar for Milton Neal
0
272
Member Avatar for funnyguy1

Create a class called Invoice with the properties (Part number, Part Description, Quantity and Price). Create appropriate methods and data types. Use the class Invoice and create an array of Invoice objects (Part number, Part Description, Quantity and Price) initialized as shown below: // initialize array of invoices Invoice[] invoices …

Member Avatar for JasonHippy
0
2K
Member Avatar for jepapel

I have the following code: #include <iostream> using namespace std; int main () { char alphabet[]="abcdefghijklmnopqrstuvwxyz"; char word; cout <<"Please input a word: " <<endl; cin >> word; int res = -1; for (int i = 0; alphabet != '\0'; i++) { if (alphabet == word) { res = i; …

Member Avatar for slumburock
0
4K
Member Avatar for cynusalisa

Hello Guys, I am Confused between the two languages Java and C++ that Which is the better Language to learn? What do You Guys Think about These languages and Can You make difference between these Languages Guys?

Member Avatar for rubberman
-1
233
Member Avatar for Sendy Hipo

hi guys, im learning c++ on my own and i have finished reading and studying E-book by Tony Gaddis ("starting out with c++, from control structures through objects, student value edition, 7th edition ") now im completely "lost" , i have searched google to see reference, but there are too …

Member Avatar for Sendy Hipo
0
141
Member Avatar for ScottFountaine

I'm trying to add a space before and after a user input. I have the space after using strcat() but cant figure out how to put one before. Here is the snippet. void find_keyword() { int len=0; int lenkey=0; int key_no=0; char teststr[50]; while((ip.keyfound==0) && (key_no!=MAX_KEY)) { // getting the …

Member Avatar for ScottFountaine
0
128
Member Avatar for osiron

Hey Guys, I'm trying to create a timer program that is based on the MVC model and I'm having trouble with updating the views via `notify()` function as they should display the number of seconds or minutes and seconds elapsed. Could anyone help me with this problem? //KeyboardController.h class KeyboardController: …

Member Avatar for mrnutty
0
190
Member Avatar for Ghost

When using C++, how do you find the REMAINDER of two numbers and store it in an integer. I think the answer is: [B]X % Y = Int Z;[/B] :idea: Please help. Thanks :lol: , C++

Member Avatar for wangchung
0
935
Member Avatar for XodoX

I can nto find anything that explains semaphores well. From what I understand, you can create an array of the type sem_t , for instance. Like a "semaphore array", I guess. And you use loops somehow to create them. Or can somebody explain this to me, please? I'm trying to …

Member Avatar for XodoX
0
110
Member Avatar for 111100/11000

#include <iostream> #include <cmath> #include <string> #include <cstdlib> #include <cstring> using namespace std; char Outputing(char shifted_letter); int found_match; int searching_alphabet; int main() { const char ORIGINAL_alphabet[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; //maybe const isn't necesery char alphabet[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; cout << "This program encrypts messages using Ceaser Cipher\n"; cout << "\n---------------------------------------------------------"; cout << "\n---------------------------------------------------------"; cout << "\nEnter …

Member Avatar for Labdabeta
0
326
Member Avatar for DeeperShade

Ok, basically i'm putting together a win32 wrapper based on various tutorials I've seen. But when I try to close it via the close buttong (top right) or via the esacpe button it doesn't do anything, with the first it closes the window but doesn't end the program, with the …

Member Avatar for DeeperShade
0
136
Member Avatar for rithish

in java we use import javax.swing when we want to use frame and panel we write like this class frame extends jframe but in c++ we use <iostream.h> and <conio.h> where we use cin and cout from these libraray functions but we dont inherit anything .we use normally we dont …

Member Avatar for Taywin
0
149
Member Avatar for triumphost

How can I compare Dimensional arrays using iterators? My attempt is below but I gave up and used indexing instead. I plan to change comparing doubles with == to use epsilon later. Also should I be using vector of vectors? //In my class, Data is defined as std::vector<std::vector<double>> Data; bool …

Member Avatar for deceptikon
0
184
Member Avatar for senergy

hi, I have trouble with getting info from my table, this is my code: [code]#include "stdafx.h" #include <iostream> #include <mysql++.h> #include <manip.h> using namespace std; #define HOST "" #define USER "senergy" #define PASSWORD "" #define DATABASE "" #define PORT 3306 // deleted info :) int main(int argc, char *argv[]) { …

Member Avatar for godinac
0
484
Member Avatar for daviddoria

For a while now I've been doing this when I want to check the input of a function (in this example, to make sure they are not equal). [code] void foo(int a, int b) { assert(a != b); } [/code] But when the assert fails, I always find my self …

Member Avatar for vibhor48
0
274
Member Avatar for MastAvalons

Hi all! I need to intercept GDI function to save painted screen to hard drive. I have tried Microsoft Detours. Everything is good, but I need 64-bit version (Detours Professional do support but it costs much). Is there any 64-bit alternatives to Detours Professional?

Member Avatar for pipaman
1
325
Member Avatar for Vasthor

this is an unusual error, but maybe if the code presented here it's easier to recognize?! void sLetter(Word_store& s) { for ((s.words_input)::iterator it = (s.words_input).begin(); it != (s.words_input).end(); ++it) tolower(*it); (s.sWords).push_back(s.words_input); return; } the function is aim to converting each character in a string from a member of Word_store into …

Member Avatar for Vasthor
0
155
Member Avatar for funnyguy1

Write a program that opens a file, reads records into a container of data structures, and prints out the sum in order. You can use Vectors to contain the data structures. 1. Create a data structure to represent the record (struct cost in cost.h) 2. Write a function called parse_account …

Member Avatar for iamthwee
0
364
Member Avatar for rithish

can any one please elaborate why template is being used i dont understand in most of the google page they say that we can reuse the code but even in inheritance we do that .why templates?????

Member Avatar for mike_2000_17
-1
89
Member Avatar for Enrique Nivasch

Hi, I am getting the following error while compiling error: argument of type 'void(FClass::)()' does not match 'void(*)()' on the line fPointer=instance.PrintIt; // Give the pointer the function address This is my code /** * @file FPointer.c * This is the main FPointer program start point. */ /** * Main …

Member Avatar for DeanMSands3
0
338
Member Avatar for mahnaz0098

hello can any one give me a simple examle code to read and write to serial port? i want to send data to the port and recevie the same. i use visual c++

Member Avatar for Ancient Dragon
0
215
Member Avatar for triumphost

In OpenGL, I'm reading about glVertexPointer which has a parameter: `const void* pointer` and it is a pointer to the coordinates of the first vertex. Thing is, it doesn't have any parameters that tell you the amount of vertices there are. I'm wondering if there is a way to copy …

Member Avatar for triumphost
0
210
Member Avatar for Suzie999

Hi, I wonder if anyone can direct me to a win32 API or offer some logic as to how I might copy memory to a specific location in an array. What I am doing at the moment is copying an unsigned int into an unsigned char[]. The reason is to …

Member Avatar for Suzie999
0
144
Member Avatar for np complete

I use this function quite a lot. Recently one of my friend told me it is not good to use fflush(). I googled it, and found that it gives some kind of unexpected behaviour. My question is when does this function works improperly and why? Nowadays I use scanf("[^\n]") to …

Member Avatar for ravenous
1
155
Member Avatar for rajeshgoblet

hello i am working on a c,c++,java tutorial website, & i want to insert lots of source code example in it. I am doing this using <span> & CSS classes. I have seen some online code highlighter. i want to make one for my site. And is there any other …

Member Avatar for Dani
0
113
Member Avatar for Sprewell184

Hey,hoping someone can help me. I'm having an error in my project. This is the problem for the project: In C++, the largest int value is 2, 147, 483, 647. So, an integer larger than this cannot be stored and processed as an integer. Similarly, if the sum or product …

Member Avatar for Sprewell184
0
577
Member Avatar for myk45

Hello All! Well this is not exactly a C++ question. Please let me know if this needs to be posted elsewhere. So, here it goes: I have a project, cosisting of the entire buildrules in Makefiles. This has been built only on Linux. Now, i need to build it on …

Member Avatar for myk45
0
214
Member Avatar for Suzie999

I have been trying in vain to pass an array to a thread and have that thread loop through it. Here is code of a simple thread passing an int to it. #include "stdafx.h" #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <iostream> DWORD ThreadProc (LPVOID lpdwThreadParam ); int threadnumber = …

Member Avatar for Suzie999
0
200
Member Avatar for Sendy Hipo

hi guys, im curious about c++ gui qt , the i searched for it and download QT opensource 4.8.2 (300mb+) for windows i run the installer, then it asked me for MinGw's directory in my pc, then i use the MinGw inside my codeblock, after that it said "Found version …

Member Avatar for Sendy Hipo
0
353

The End.