49,761 Topics

Member Avatar for
Member Avatar for Curious Gorge

Hi again guys this time I have a question about computer security that's related to my programming hobby. I hope this isn't against the rules. I am asking this out of curiosity and concern, not because I want to do evil. However thanks to some knowledge I gained from a …

Member Avatar for mike_2000_17
0
200
Member Avatar for Labdabeta

Hello, I have a `HWND` for a window. I have double checked that it is a 100% valid window by using `SetActiveWindow()`, `SetFocus()`, and `SetForegroundWindow()` on it, successfully bringing it to the frontmost window. However whenever I try to use `GetPixel` on it it returns -1 (0xFFFFFFFF). What am I …

Member Avatar for BobS0327
0
1K
Member Avatar for sandeepxd

Hi i am new with C++, i just need a little bit help with this. please reply code compatible with orwell dev C++ I want an application that uses windows RegisterPowerSettingnotification function for the events of GUID_ACDC_PowerSource.... i tried like below but my dev C++ compiler was not able to …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for butterfingerss

I have used Qt to create GUI program in C++, but i have given up in trying to statically compile Qt. i have moved on to microsoft visual studio 2013, the question i wanna ask is does the same problem occur in visual studio ( creating static programs ). if …

Member Avatar for butterfingerss
0
259
Member Avatar for janith.amarawickrama

I rote this code in my program JSONNode::const_iterator iter = root.begin(); for (; iter!=root.end(); ++iter) { const JSONNode& arrayNode = *iter; std::string type = arrayNode["type"].as_string(); if(type == "node") { std::string id = arrayNode["id"].as_string(); double lat = arrayNode["lat"].as_float(); double lon = arrayNode["lon"].as_float(); Node node; node.SetId(id); node.SetLatitude(lat); node.SetLongitude(lon); nodesMap.insert( std::pair<std::string, Node>(id, node) …

Member Avatar for Banfa
0
510
Member Avatar for mystycs

I want to create a queue that holds certain information. I want it to hold multiple peices of information like below. Name, Age, Race, Sex. How can i create a queue FIFO. that holds multiple pieces of information like this that i can access or add into? Thanks!

Member Avatar for David W
0
866
Member Avatar for Sudhanshu_1
Member Avatar for glamiex

How do I change this code so that the user can choose a math operation and determine have that type of operation(either add sub mult or divide) run as much as a user wants it to? Say, if the user wanted 5 addition questions only. And how do I keep …

Member Avatar for David W
0
156
Member Avatar for janith.amarawickrama

I created following classes in my program. Way.h class Way { private: std::string id; std::string name; public: Way(); Way(const Way& orig); void SetName(std::string name) { this->name = name; } std::string const & GetName() const { return name; } void SetId(std::string id) { this->id = id; } std::string const & GetId() …

Member Avatar for rubberman
0
173
Member Avatar for cazmere
Member Avatar for shizu

Hi all.. I have a image taken by vision machine camera.. Object is arrange by different layers.. I able to get accurate object position for those drop in calibration layer.. For layers that before and after calibration layer,position is not accurate.. Working distance is fix.. Can u all provide me …

0
79
Member Avatar for LucyLogic

I need some assistance with a program I wrote and had to alter. Here are the initial instructions and what I initially had then my reworking and what I have now and any assistance would be helpful. Write a C++ program to help you balance your checkbook at the end …

Member Avatar for David W
0
3K
Member Avatar for dan.doca

so i got a class going for making and showing tree elements, i need some help with the following: i need to display the leaves and the height of the tree. here is the code: // ar.cpp #include <iostream> #include <stdlib.h> using namespace std; class nod { public: char inf; …

Member Avatar for dan.doca
0
373
Member Avatar for Emma_3

I'm trying to convert a number from any base between 2-36 to any base between 2-36. I have the conversion to base 10, but I'm having trouble getting it from base 10 to the desired base. Any ideas? I know part of this idea will work, I just can't get …

Member Avatar for David W
0
516
Member Avatar for mystycs

I am trying to print my queue which has values in it. Right now i have this. for(int i = 1; i<ReadyQueue.size(); i++) { } But i am stuck now because i have no idea how to print a queue without popping it off the front. So now i am …

Member Avatar for David W
0
1K
Member Avatar for mystycs

I have a class below class CPU { public: void setPID (int a) { PID = a; } int retrievePID() { return PID; } private: int PID; }; And i am curious if you can create a queue into this class? I am trying to queue in a value into …

Member Avatar for David W
0
438
Member Avatar for chubbyy.putto

Here is question: Write a program that reads a string from the user containing a date in the form mm/dd/yyyy. It should print the date in the form March 12, 2012. #include<iostream> using namespace std; int main() { int mon; int day; int year; string month[] = { "January", "February", …

Member Avatar for David W
0
1K
Member Avatar for memona.ali.5836

Write a program to get 3 numbers from user for integer variable a, b,and c. if a is not zero, find out whether it is the common divisor of b and c.

Member Avatar for David W
0
203
Member Avatar for mystycs

How can i write it so that my program only accepts positive integers that are great than or = 0? I want my program to ask "How many devices do you wish to add?" And if a user enters a letter, or anything negative it will ask them to enter …

Member Avatar for David W
0
19K
Member Avatar for Tsaou

I keep getting loads of linker errors that probably have something to do with virtual-functions/definitions and/or static class members... I've seen several relevant posts but none of the solutions suggested work, can you see wht the problem is here? My projects consists of 3 files: BALLS.H #include <iostream> using namespace …

Member Avatar for Ancient Dragon
0
506
Member Avatar for mystycs

I am getting an error on this code. Is it to do with whats in the while loop? How do i get it working? Basically i want to be able to take in letter or number variables, and each would output something, and if they type exit it breaks out …

Member Avatar for David W
0
524
Member Avatar for mystycs

How can i create a input that only allows the letters a b c d The console will ask to please enter a letter. And they can only enter the letters a b c d. And if they enter it, it says thank you for enter a, or b or …

Member Avatar for David W
0
311
Member Avatar for john.kane.100483

Ok this program is almost done. Some correction are still needed. Can anyone here put this in character array. #include<iostream.h> #include<conio.h> #include<stdio.h> char value; char t, u, v; char answer; void Binary2Decimal() { gotoxy(1,9);printf("[BINARY TO DECIMAL CONVERSION]"); char b2,f2=1,d2=0; gotoxy(1,11);printf("Enter a Binary number: "); scanf("%d", &b2); printf("\n\n"); while(b2>0) { if((b2%10)==1) …

Member Avatar for David W
0
1K
Member Avatar for shaneetra.graham

cd just stays at this state: sgraham@myshell:/home/class/sgraham>cd .. sgraham@myshell:/home/class/sgraham>cd .. typedef struct { int argument; // userCom arguments char *arg[MAX_ARGS + 1]; // userCom arguments array char *Listcomm[MAX_COMMAND_SIZE]; char *input; // hold input file char *output; // hold output file } Command; int main() { Command userCom; //holds userCom struct …

Member Avatar for JasonHippy
0
219
Member Avatar for thewalrus

The only time I know of is when we call the assignment operator. Is there any other moments I should do it? Like any other operator where memory management would be useful?

Member Avatar for panqnik
0
65
Member Avatar for thewalrus

public: Queue() : front(0), back(0) {} void put(TreeNode *ptn) { ListNode *tmp = new ListNode(ptn, 0); if (back == 0) front = tmp; else back->next = tmp; back = tmp; } TreeNode *get() { assert(front); TreeNode *result = front->ptn; ListNode *tmp = front->next; delete front; front = tmp; if (front …

Member Avatar for thewalrus
0
208
Member Avatar for CHETNA_1

i have declared two functions of void type.lets one function calculates value of variable 'c' and other of variable 'y' and when i cout them it comes out to be correct within the function.now i want to declare another function that compares values of 'c' and 'y' and return 1 …

Member Avatar for panqnik
0
160
Member Avatar for aronno.amin
Member Avatar for Vasthor

My friend and I tried to create a team of programmers for doing bunch of work, our main aim is the gaming sector (probably). It was said around the net that it was hard work. So, we decided to plan it from now. I got around 1-3 years(blurry because I'm …

Member Avatar for deceptikon
0
251
Member Avatar for shaneetra.graham

hello i'm trying to make this into a switch statment but i'm having trouble. Any help would be great!!! this is for a shell commands in C. if(strcmp(command->comm[0], "exit") ==0) //exit { printf("EXITING.....\n"); break; } else if(strcmp(command->comm[0],"history")==0) //history { int i=1; for(;i<hisSize;i++) printf(" %s ",history[i]); } //history end else if(strcmp(command->comm[0],"echo")==0) …

Member Avatar for shaneetra.graham
0
117

The End.