49,761 Topics
| |
Does anyone know the equivalent version of cvCreateImage in c++. I tried googling it but no luck. Thanks!!! | |
Good Morning, I'm having some problems with my code. This program is to have at least 5 functions . 1.)Ingrades: a two dimensional array that stores student ID, grades and times absent. 2.)Score. Calculates scores for all course work (two partial tests 15% each , two quizzes 10 %each, 1 … | |
can any body tell me a udf program in c++ which accepts a squared integer matrix with odd dimensions(like 3*3,5*5....) & display the sum of the middle row and middle column elements. please help me if you can................ | |
| Below is the error I am currently facing however I have yet to be able to bring up the console window to see if my code is correct. It has been very frustrating :( 1>iLab4.cpp(67): error C2144: syntax error : 'int' should be preceded by ')' 1>iLab4.cpp(67): error C2660: 'toDigit' … |
erm i got a bit problem with toupper(); example: char ch = 'a'; char upper; upper = toupper(ch); if i use cout to show char "upper", it shows the ascii code for uppercase.. in this case, it shows '65' in screen, i know it supposed to show 'A' instead of … | |
I am writing a program in which you can ask a question, and then if the phrase is jknown to the computer, it will ouput an answer, but I was wondering is there a faster way to the way I am doing it, because at the moment i am just … | |
Hi all, I've just started learning C++. Basically I wish to try out some basic C++ codes and operations in Codeblocks. I created a project under which I intend to put all the C++ programs in. The default ''Hello world'' program runs fine- but whenever I try to run the … | |
I can not find the problem of this code....... I am now using Dev C++ editor for coding. #include<iostraem.h> #include<conio.h> #include<stdio.h> using namespace std; int main(){ int k=1; int m=0; int p=5; //int arry[]; int v=0; int i=0,j=0; cin>>i; cin>>j; for(int n=i;n<=j;n++,v++){ m=n; while(n>1){ if(n%2!=0){ n=3*n+1; } else n=n/2; k++; … | |
any one knows how to write this program:- given two arrays A and B . array 'A' contains all the elements of 'B' but one more element extra. write a c++ function which accepts array 'A' and 'B' and its size as arguments/parameters and find out the extra element in … | |
i know how to read a file into array, however i want to perform some search operations which is difficult to do on array. if someway i am able to read a file to string then it becomes easier. i have 2 methods of reading a file into wstring but … | |
here is the code, that reads a file. Currently i am able to print contents of the file but i want to edit its contents. how can i do this? #include<iostream> #include<fstream> using namespace std; void main() { wfstream file; file.open("hello.exe",ios::binary | ios::in); if (!file) { cout<<"ERROR"<<endl; exit(0); } wcout<<file.rdbuf(); … | |
#include <Stdafx.h> #include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand( static_cast<unsigned int>(time(NULL))); // set seed for random numbers cout<< "Enter number of trials to run "; cout<< "and press ENTER: "; cin>> … | |
Hi all ! I tried a lot of time to find something useful to get disk and network usage (separately) for a Windows process. Actualy I make use of [Windows Performance Counters](http://msdn.microsoft.com/en-us/library/windows/desktop/aa373083(v=vs.85).aspx) but it can't provide separated statistics, it provide me all IO activity. A disadvantage in Performance Counters are … | |
i read c++ ebook, then i make a code to open a file using fstream and use ios::in flag here's the code : #include <iostream> #include <fstream> using namespace std; bool openFileIn(fstream&, string); int main() { fstream dataFile; if(openFileIn(dataFile, "sendy.txt")) { cout<<"succes"; } else cout<<"fail"; return 0; } bool openFileIn(fstream … | |
Can anyone please help me that how this program works?? i have got this Program on internet and i want it to run..... #include <cstdlib> double** gauss(double **matrix, int dimension) { double **inverse; inverse = (double**) malloc(dimension * sizeof (double *)); for (int i = 0; i < dimension; i++) … | |
**Before you start complaining that this has been asked before, please hear me out** Hello, I've been trying to write an simple application for windows that can send and recieve packetts over a network. I'm hoping to find some simple library that can simply open the port, and send a … | |
Hi! i have problems with input validation, so here goes the problem : Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Telephone Number Account Balance Date of Last Payment VideoNote Solving the Weather Statistics Problem Review … | |
I have an abstract class. I'm creating a large array in the base class, which appears to never be deleted because no destructor is called. My questions (obviously) are... * Why isn't a destructor called? * How do I fix it? #include <iostream> using namespace std; class A { protected: … | |
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <malloc.h> struct account { char AccName[20]; int Age; double AccBalance; struct account *Next; }; typedef struct account BankAcc; void init( struct Account **headOfList ); void insert(struct account **headOfList, char *name, int age, double balance); int Delete(struct account **headOfList, char *name ); void print(struct … | |
I'm doing a class project, creating a text based game, separate compilation must be used. The descriptions for each room must be kept in it's own class. Here is an example of what I have: Room.h #ifndef ROOM_H #define ROOM_H #include<iostream> #include<string> using namespace std; class Room{ public: ///set the … | |
Sorry, this might be abit of a rush and sudden. I have to finish this program in 3 hours time. I would appreciate if there's any kind soul willing to help me with the code. Thank you. Output of the program should be like this. Top popular 12 words 1 … | |
#include <Stdafx.h> #include <iostream> #include <stdlib.h> #include <time.h> #include <math.h> using namespace std; int rand_0toN1(int n); int hits[10]; int main() { int n; int i; int r; srand(time(NULL)); // set seed for random numbers cout<< "Enter number of trials to run "; cout<< "and press ENTER: "; cin>> n; // … | |
Hi guys, I need to parse JSON data from an HTTPS protocol so I downloaded and integrated libcurl into my VS2010. Everything works fine and sample codes work fine when I use "http" protocol. However, a CURL error keeps coming out when I try to read from "https" protocol.... The … | |
C++ Programming The file attached contains the instructions. This is what I have done so far. It outputs the contacts from the file. I need help by tonight. Please Help!!!! I have all the tokens on the vector token. I want to create a Contact with those tokens Ex: Contact … | |
Hi , Help me to convert flowchart to pseudocode . Thanks Flowchart in PDF : http://www.4shared.com/office/FgnhUYgw/Project_Full_Flowchart.html | |
Hi! I'm working with word through my c++ application. And I want to read some documentation about available opportunities. I see some piece of code of some paticular situations (to add a picture, to add text, to save file, to fill table) in forums, but I want to observe all … | |
Hi all, I am attempting to assign values to a multidimensional array but am having difficulty. This isn't the exact code that I'm using, but the idea is this: for(int T=0; T<5; T++) { array[T][3][4] ={{4,2,6,4},{5,2,5,3},{6,3,1,5}} } For all T from T=0 to T=4, assign the same values shown above. … | |
Hi Recently I had the following error occur when the CImg destructor is called, 0xC0000005: Access violation. It occurs at the end of the function unwrapFilteredImage when the destructor is called and I have traced it to the point where inImage is being destructed. The first thing that is destructed … | |
#include <iostream> #include <string> #include <cmath> #include <math.h> #include <algorithm> #include <cstdlib> using namespace std; int main() { string names[10]; int score[10]; for(int scores = 0; scores < 10; scores++) { cout << "What is your score? "; cin >> score[scores]; cout << endl; } int swapHolder = -1; int … | |
a simple c++ program for an adress book that adds contact, stores the contacts and searches for the contact... it should have only one class called class addy_book..i called a constructor and am stuck coz i don't know where to go from here #include <iostream> #include <fstream> using namespace std; … |
The End.