49,761 Topics
| |
I need acode that the ouptut include sum,average,maximum,minimum,sort and search | |
This is a program which I made back in the beginnings when I was trying to figure out how to work with strings, and how to work with files. This is suppose to format a C++ code, for example if the syntax of an if statement is if (condition) { … | |
Howdy, I'm trying to write a program that will copy files from one destination to another. After some reasearch it was suggested that I use SHFileOperation, and SHFILEOPSTRUCT. I'm trying to set the struct members accordance with [MSDN](http://msdn.microsoft.com/en-us/library/bb759795%28v=vs.85%29.aspx), however, I run into a problem with pTo and pFrom. The error … | |
Hi everybody, I'm trying to make a program to get the file creation or access or modification date, but the program always is returning me this date "Thu Jan 1 01:00:00 1970". I tried lots of codes and heelps from the forum, of posts from other users, but the result … | |
can someone help me to begin with face expression detection in c++,i want to detect basic facial expression via camera in realtime.like this http://www.youtube.com/watch?v=n8wJ8tjmnmU | |
Ok, first post. Ive tried to avoid asking for help when i've had problems before and usually managed to solve things on my own but on this, i'm just going round in circles. I'm trying to teach myself basic directx9 and so far I made a program that takes a … | |
I have the following records containing 5 numbers each. They are as follows :- sr1 12, 23,34,35,36 sr2 14,18,25,31,37 sr3 7,11,19,26,42 sr4 2,17,29,32,40 sr5 5,9,16,28,33 sr6 15,21,31,39,41 Now I want to generate new records of 5 each numbers from the above numbers. New record should not contain more than 2 … | |
Im having a bit of trouble converting the delphi code below into c++, i'm sure I need to use a Switch statement but I seem to be getting it wrong. Basically, I have 6 panels mounted on a larger Panel, each caption will contain a random number. A button then … | |
Write a program that reads a set of measurements from a file called sensorDataRaw.txt. There are two columns of data in the file; the first is time in minutes and the second is height in feet. The program should read all of the data into two arrays, and then sort … | |
I'm having a huge problem trying to learn how to export classes from a DLL. I can do some functions just fine but the classes are mangled :S I've tried from .def file, I've used extern "C" but when I did, it threw errors and won't export the class at … | |
I'm Creating a class that I want to call a recursive function within it. However, the complier says i cant declare a function within a method, I was wondering how I could Recursively call that function, in the method, or how to recursively call that method, with out declaring the … | |
Good Afternoon, How would you solve a question that states: assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the pseudocode to find the record with a specific studentID if every single student ID from 101 … | |
I need to load a BMP into C++ and code a program to convert it into a JPEG. I have very little programming experience and am wondering what libraries should be used to efficiently convert an image in this way. Is there a library that will convert the BMP straight … | |
I have: 39H4-GTT7-LGLN And I'm trying to find every possible combination of sets. Basically each section is scrambled within itself. So there's only 16 combinations for each section. Example the first section I wrote it out as: 39H4 394H 349H 34H9 49H3 4H93 493H 4H39 9H34 934H 943H 9H43 H493 … | |
I'm trying to compile the following program (file named test.cpp): #include "stdafx.h" int main(int argc, char* argv[]){ INPUT *buffer = new INPUT[1]; //allocate a buffer buffer->type = INPUT_MOUSE; buffer->mi.dx = 100; buffer->mi.dy = 100; buffer->mi.mouseData = XBUTTON1; buffer->mi.dwFlags = MOUSEEVENTF_LEFTDOWN; buffer->mi.time = 0; buffer->mi.dwExtraInfo = 0; SendInput(1,buffer,sizeof(INPUT)); delete (buffer); //clean … | |
Good Afternoon, I'm reviewing structs, but don't get the concept very well. Assume the following structure declaration is given struct Rectangle { int length; int width; }; write a function that returns a Rectangle structure. The function should store the user's input in the members of the structure before returning. … | |
I am having trouble with this assignment, especially the input file and how to get the data into an array: You will design a set of classes for storing student information, along with a main program that will read student information from a file, store the data, compute final grades, … | |
Why do you think there are soo many programming languages? | |
Hello all, I have a long list of coordinates which are supposed to trace the outline of a city. They are supposed to go into a program which plots the trajectory from one coordinate to the next, thereby plotting the outline. For some reason (I'm not sure why; I'm trying … | |
I want to Inject Scripts inside VBScript.dll site, so that the scripts are available to different COM interface which have implemented the Windows Script Interfaces(or Active Script Interfaces). Thanks | |
I am using the CUDD package for BDDs manipulation. I want to make a copy for a big data structure in it that is called the DdManager. The problem is : this data structure has so many pointers inside it , so when I make a direct copy it is … | |
I am generating the sequence 1,3,8,22,60,.... upto 10^9 the term mod of 10^9+7; However my code is giving inaccurate answers for large value of n. The formula I am using is ((1+Q)^(n+1)-(1-Q)^(n+1))/(4*Q) Here Q is sqrt (3) Here is my code.Can someone point out the error in the code or … | |
#include<iostream> #include<fstream> #include<string.h> using namespace std; int main() { //system("clear"); cout<<"\npls input the file where you want to read the data from\n"; string loc; getline(cin,loc); ifstream g; g.open (loc.c_str(),ios::in); string data; g>>data; cout<<"\n\n\n\n"; cout<<"\nthe data read from the file is\n"; cout<<endl<<data; return 0; } > even if fiole being read … | |
Good Afternoon, I'm having problems with my program that deals with fractions. The problems are with the functions multiply and divide that are not working correctly. So far I have this code. CPP FILE: #include <iostream> #include <cmath> #include "hw4_head.h" using namespace std; int main () { int a, b, … | |
I wanted to write the brute force algorithm for string matching by multithreading. I have made the program by using a single thread. In multithreading sample code, I have initialised the no. of threads to be strlen(text)-strlen(pattern). I do the matching in the ThreadFunc. Do I have to divide the … | |
I have a problem with the following code.Please help me out #include<stdio.h> #include<iostream> #include<conio.h> #include<winsock.h> #include<winsock2.h> #include<fstream> #include<windows.h> #define WIN32_MEAN_AND_LEAN #include <sys/types.h> #include <streambuf> #include<string.h> using namespace std; int main() { int length; char *buffer; const int iReqWinsockVer = 2; WSADATA wsaData; if (WSAStartup(MAKEWORD(iReqWinsockVer,0),&wsaData)==0) { if (LOBYTE(wsaData.wVersion) >= iReqWinsockVer) { … | |
Hello, I am trying to make an OpenGL Hearts game ( like the one from windows 7 or such) but I expected some problems. First I will show you the code that iv done untill now : Card.h: #ifndef Card_H #define Card_H //#include <GL/glut.h> //#include <SOIL.h> #include <stdlib.h> class Card … | |
I have a Two Test classes that use variadic templates but I made the constructors explicit so that the compiler doesn't convert anything and leave everything as it was. One class was Array and the other was called 2DArray. When I intialize 2DArray, the compiler was converting its arguments to … | |
Hi all, I've browsed the net trying to find a paradigm to describe what I'm looking for but haven't been successful. So I'll try to explain it as succinctly as I can. Right now, for my PhD research, I've set out a few applications that take input files that have … | |
I'm trying to test my copy con and move con as well as their assignment operators. It NEVER gets invoked :S Copy con gets invoked just fine but the assignment operators are never called and neither is the move constructor. How can I test it to make sure it works … |
The End.