Hey everyone, I'm looking to add a block / function within a C++ application that will search for open windows. For instance, wordpad and notepad. If either are open perform an action. I'm doing this within win32 API but my question is this. If I create something as such, this has to be on a thread. (I come from a VB background) and we had timers. What would be the best way to implement a timer in C++? I was thinking a do loop on a thread that checks for certain things, but would this be too memory / cpu …

Member Avatar
Member Avatar
+0 forum 1

Can any one give me snippt code for single, double and single circular linked list.

Member Avatar
Member Avatar
+0 forum 1

Create a new file with the following code in main(): a for loop that prints the numbers 75 to 125 a for loop that prints the numbers 50 to 30, in reverse order a while loop that prints the numbers from 66 to 111 a while loop that prints the numbers from 50 to 30, in reverse order a for loop that prints any number from 1 to 100 that: --- is evenly divisible by 3 or is evenly divisible by 4 (example: 3,4,6,8,9,12...)

Member Avatar
Member Avatar
-1 forum 2

#include<iostream> using namespace std; int main () { int arr[14], n, i, sum = 0; cout << "Enter the size of the array : "; cin >> n; cout << "\nEnter the elements of the array : "; for (i = 0; i < n; i++) cin >> arr[i]; for (i = 0; i < n; i++) { sum += arr[i]; } cout << "\nSum of array elements : " << sum; return 0; }

Member Avatar
Member Avatar
+0 forum 3

The library optimezedr should determine if a collection of books is in ascending or desending order.Your solution must read books from a text file and produce 2 additional text files one in ascending order and one in Descending order. then your solution will indicate if your original text file in in ascending or descending order or not sorted .You can only use the following c++ libraries:iostrem,fstream and string. Could someone please help me with this thank you.

Member Avatar
Member Avatar
+0 forum 2

so far i have this code.. [CODE]#include "stdafx.h" #include <iostream> #include <windows.h> #include <string> using namespace std; int main () { const int r1 = 175; const int g1 = 163; const int b1 = 134; HWND hwnd = FindWindow(NULL,"Test - Microsoft Visual Studio"); SetForegroundWindow(hwnd); HDC hdc = GetDC(hwnd); POINT lame; lame.x = 0; lame.y = 0; int x = lame.x; int y = lame.y; for (int i = 0; i < 1280; i++) { x = i; y = 0; COLORREF col = GetPixel(hdc,lame.x,lame.y); int red1 = GetRValue(col); int green1 = GetGValue(col); int blue1 = GetBValue(col); if (x == …

Member Avatar
Member Avatar
+0 forum 14

Input: grid[][] = {"axmy", "bgdf", "xeet", "raks"}; Output: Yes a x m y b g d f x e e t r a k s Input: grid[][] = {"axmy", "brdf", "xeet", "rass"}; Output : No The general idea of what output should be. I have already coded the grid: # include <stdio.h> # include <math.h> # include <stdlib.h> int x; int y; char grid [10] [10]; int z; int j; int main() { // declare array with alphabet char alphabet[26] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', …

Member Avatar
Member Avatar
+0 forum 14

Need help modifying this code to add to my code. My code creates a grid but does not check if a word exists or not yet. Also, it should be user interface, user types in word, and computer outputs yes or no. // C++ program to check if the word // exists in the grid or not #include <bits/stdc++.h> using namespace std; #define r 4 #define c 5 // Function to check if a word exists in a grid // starting from the first match in the grid // level: index till which pattern is matched // x, y: current …

Member Avatar
Member Avatar
+0 forum 2

/* SPRPTA Bus Ticket Reservation System C++ Software Development Project */ #include <iostream> #include <fstream> #include <cstdio> #include <conio.h> #include <cstdlib> #include <stdio.h> using namespace std; int count01 ; // class Passenger class Passenger { string str_City, str_ContactNumber, str_UserName, str_Password, str_name ; protected: string str_NIC ; public: Passenger(){} Passenger(string name, string NIC, string City, string ContactNumber, string Username, string Password) ; void Login(); void SearchFile_and_Update() ; void Deletes() ; ~Passenger() ; }; // class Seats class Seats{ protected: int i_SeatNo ; public: void CheckSeatAvailabilty() ; }; // class Reservations class Reservations : public Passenger,public Seats{ protected : string str_Arrival_St, str_Dep_St …

Member Avatar
Member Avatar
+0 forum 6

Need help to edit this code to allow user to find words in the grid that are touching horizontally, vertically, and diagonally adjacent. For example, the board: Q W E R T A S D F G Z X C V B Y U A O P G H J K L contains the magic words WAS, WAXY, JOB. The attached file contains my code in c++ [Click Here](null)

Member Avatar
Member Avatar
+0 forum 3

#include <iostream> using namespace std; int rankfun(double left, double right){ int rank; if(left < right){ rank =-1; } else if(left > right){ rank = 1; } else{ rank = 0; } return rank; } int main(){ double number1 = 1.7; double number2 = 2.3; int result; result = rankfun(number1,number2); cout << "The 1st result is:" << result << endl; result = 2+rankfun(number2,number1); cout << "The 2nd result is:" << result << endl; result = 3*rankfun(number1,number1); cout << "The 3rd result is:" << result << endl; result = rankfun(number1+1,number2); cout << "The 4th result is:" << result << endl; result = …

Member Avatar
Member Avatar
+0 forum 4

I'm trying to write a function that will draw a right triangle that will ascend and then descend after the max height is reached. It is to be drawn using the asterisk symbol. I'm fairly new to recursion and that is the primary method I need to use to solve this problem. Any guidance or critique to my code would be appreciative. I can only edit the code that is marked TODO. ![Desktop_3-25-2019_12-16-42_PM-239.png](/attachments/large/4/b3aa4c2ae8f713c4d688654b049bc59b.png) // File: main.cpp #include <iostream> #include <fstream> #include <iomanip> using namespace std; int recursiveCount = 0; void triangle(const char drawChar, const int maxHeight, const int currentHeight); int …

Member Avatar
Member Avatar
+0 forum 2

Victor and Francis are looking to buy a house in a new development.After looking at the several of models,the three models they like are colonial,split-entry and single-story. The builder gave them the base price and the finished area in square feet of the three models.They want to know the model(s) with the least price per square foot. Write: a.Problem Analysis b.Algorithm c.Flowchart d.Pseudocode e.Complete C++ program f.Output

Member Avatar
Member Avatar
+0 forum 1

INTERSECT(p1,p2) 1 answer <----() 2 while p1 not equal Nil and p2 not eqaul Nil 3 do if docId(p1) = docId(p2) 4 then ADD (answer, docId(p1)) 5 p1 <--- next(p1) 6 p2 <---- next(p2) 7 else if docId(p1) < docId(p2) 8 then p1<--- next(p1) 9 else p2<--- next(p2) 10 return answer

Member Avatar
Member Avatar
+0 forum 1

I have an HDC file(that is taken by screen that I want to save it to any image file (prefer Bmp) , the thing is I don't really know the format and any function that I find for saving takes to many function inputs (that must be maximum 2). Any help saving it? int nScreenWidth = GetSystemMetrics(SM_CXSCREEN); int nScreenHeight = GetSystemMetrics(SM_CYSCREEN); HWND hDesktopWnd = GetDesktopWindow(); HDC hDesktopDC = GetDC(hDesktopWnd); HDC hCaptureDC = CreateCompatibleDC(hDesktopDC); HBITMAP hCaptureBitmap =CreateCompatibleBitmap(hDesktopDC, nScreenWidth, nScreenHeight); SelectObject(hCaptureDC,hCaptureBitmap); BitBlt(hCaptureDC,0,0,nScreenWidth,nScreenHeight, hDesktopDC,0,0,SRCCOPY);// |CAPTUREBLT); SaveBitmap("Screen Capture.bmp",hCaptureBitmap);<----- //Save Bmp //here to save the captured image to disk ReleaseDC(hDesktopWnd,hDesktopDC); DeleteDC(hCaptureDC); DeleteObject(hCaptureBitmap);

Member Avatar
Member Avatar
+0 forum 3

In the follwong program a class-type temporary is cast to a refrence and they changed: struct A { int a; A() { a = 100; } }; void f(A& x) { x.a = 200; }; int main() { f((A&)A{}); } No errors in Visual Studio and GCC. But is it safe to use such cast, instead of useing rvalue reference, in Standard C++?

Member Avatar
+0 forum 0

I was wandering aimlessly on google, I found [ReactOS](https://www.reactos.org/). It's interesting. I tried this OS, many windows applications are running well on it. But some latest applications are unable to run like **Firefox 65.0.1** I have few questions, * How worth is using this OS? * What is future of this OS? * How secure is this OS? * What development is required to run latest applications? * How to search books & tuts, which are useful for this OS development? * Can anybody help me here to compile & edit some part of OS (I would like to do …

Member Avatar
Member Avatar
+0 forum 13

heloo i need help on how to tackle the problem. some basic ideas and keypoints.

Member Avatar
Member Avatar
+0 forum 1

Hi, I've been playing a game from a few years back (I really enjoyed it) and I found that it was open source on github. I would love to make my own version and see how it goes. I have experience with python as a hobby, and I've had a go at c++ - I made a few games with the sdl library. The github link - https://github.com/id-Software/RTCW-SP It will be great if I could at least render a level and a character. From what I see, the source has everything I need apart from the graphics. If someone can …

Member Avatar
+0 forum 0

two error come of (strcpy was not declare in this scope) would any one show me, hw to remove this error, ... plz Project Title: Student Record & Registration using Linked list Description: This project is a Linked List application. If you would like to refresh you knowledge about linked list, you may read this article: Linked List. The project considers an engineering university having three departments: Electrical, Mechanical and Comptuer System Engineering(CSE). The university considers Metric(O-level) , FSc(A-level) and entry test marks for registering a student and calculate an aggregate based on a specific criteria. The project finds in …

Member Avatar
Member Avatar
+0 forum 4

Hey, I am in desperate need of some assistance with this Baffles coding. I do not know where to begin and I am completely confused with the instructions https://www.daniweb.com/programming/software-development/threads/324780/baffle-game-c#js-quick-reply the link above is a link to the old thread as a reference. I am using the c++ language and the Qt Creator. HELP ME!

Member Avatar
Member Avatar
+1 forum 2

**Create a student class which has following functionality:** - Initialise a student with mandatory parameters - Create a student with name, email and phone number - Add a list of subjects based on which class he is - Add a function to calculate his percentage based on marks scored ***I have written C++ code of student database. I want python code so please anyone write in python and share asap.*** Thanks in advance :-)

Member Avatar
Member Avatar
-1 forum 14

Write a C++ program that would depict car pooling is of much advantage to the environment and to the user . NB:Enforce security in currency output.

Member Avatar
Member Avatar
+0 forum 2

<link deleted>

Member Avatar
Member Avatar
+0 forum 2

Hey everybody, I was just wondering, how do you create Lens Distortion in OpenGL? As in, the rendered image looks bloated or sucked in when you implement it. I would typically want it in a simple format that works nicely and doesn't eat up too much CPU. As an extra, how about a spiral distortion? (I've seen it once when I was playing C&C Yuri's Revenge) Thanks in advance.

Member Avatar
Member Avatar
+0 forum 13

What useful plug-ins / debuggers for Visual Studio do you use (for Windows)? P.S. I know Visual Studio has a good debugger)

Member Avatar
Member Avatar
+1 forum 5

Hi, im still new in c++ so i'm happy if anyone can help me Hi, is anyone know how to search two text file and the output will be - show which text file - line number - the word itself currently what i did is i need the user to key in the text file. i dont want to do that, i want it to be search word : small and it will show the filename line no small (which the word i search) #include <iostream> #include <string> #include <fstream> using namespace std; int searchWord() { string input_file,searchWord,line; while …

Member Avatar
Member Avatar
+0 forum 1

plz someone help me with this problem. i have uploaded the code file down Make a class fraction () with a numerator and a denominator. Create a constructor and overload some operators so that the code below can run on

Member Avatar
Member Avatar
+0 forum 1

## Hey, ## I crated a program which can search a text for a string and gives you every line which conatins that string back. Now I want to create another text file with the output. But I cant get it to work. Actually I have no problems with creating the text file becasue its creating it but its always empty. I just dont know how to gte the results from the top of my code into the output text file. Here is my code: #include <string> #include <fstream> #include <iostream> #include <sstream> using namespace std; int main(void) { string …

Member Avatar
+0 forum 0

To be honest with you, all the codes that i made were self taught, i had to advance myself to learn more stuff in C++ which my first challenge is to make a simple but clean made text based adventure game, but im at the wall atm. (don't judge me, i'm still a newbie to C++) One is making choices, i tried doing "if" then "else if", on my last project, and it always reads the first "if", making the other two choices non-readable, so i had to force myself to make only one choice (hence making it a game …

Member Avatar
Member Avatar
+2 forum 3

The End.