49,761 Topics
| |
IplImage *in; CvMemStorage *storage = cvCreateMemStorage (20506); CvSeq *contours=NULL; CvPoint *PointArray=NULL; for() { //image processing and feature extraction code here cvClearMemStorage (storage); //clear memory area free (PointArray); cvReleaseImage (&in); } At the end of each iteration i ma releasing memory but still i get memory shortage error after # processing … | |
Hello All Tell me who is correct I or my friend void main() { int GuessMe[4]={100, 50, 200, 20}; int Taker=random(2)+2; for(int Chance=0;Chance<Taker;Chance++) cout<<GuessMe[Chance]<<"#"; } I am testing random() in Turbo C++ 3.5 By this code I am always getting answer 100#50# whenever I am executing this code. My argument … | |
Does anyone know of a compiler that translates a C++ code to MIPS Assembly Language | |
Just like the title says, could you give me arguments for it? | |
I am to make a rev op on linked node but somehow i couldnt get to work. I got an error I am kinda stuck right now. The error is in gray Somehow and somewhere doesnt show the reverse link. Can someone show how to do the search node like? … | |
i have a problem and i can not solve it. Problem is that for example there is an admission form on internet and a student enter his name in digits no dought it is wrong and now here is a problem how to restrict the student that he/she should not … | |
It is possible to use any number of characters '/' as a delimiter in path instead of one traditional '/'. For example, strings //usr///local//nginx/sbin// and /usr/local/nginx///sbi n are equivalent. The character '/' (or some sequence of such characters) at the end of the path is required only in case of … | |
Ok, I hope this is the right place for his kind of disccusion. I assume that this kind of question is rather apsurd but I may get killed for this. I have had expirience with both java and c++ but non in field of system programming. I am finishing my … | |
here is the question: The series of numbers: 1, 1, 2, 3, 5, 8, 13, 21, ….is known as Fibonacci series. Each number is the sum of the two preceding numbers. Write a C++ program that writes the first 5 Fibonacci numbers to a file fibnos.txt (in your local drive). … | |
I'm trying to understand this function. I try to compile an run it, but it gives an error message at line 12. Thanks. #include <iostream> #include <string> #include <cmath> using namespace std; int stringConvertInt(string raw) { int sum=0, power=0; power=raw.length()-1; for(int i=0; i<raw.length(); i++) { sum=sum+(pow(10,power)*(raw[i]-48)); power--; } return sum; … | |
i have a problem that how to concatenate more than two string in operator overloading i write a code but it is not run #include<iostream> #include<conio.h> using namespace std; class count { private: char str[50]; public: count() { str[0]='r'; } void input() { cout<<"Enter string = "; cin.getline(str,50); } count … | |
My program displays the details of 2 students. name id address module code and module marks. my program works well but the problem is when i enter the details of the 2nd student i am not able to enter the name as if it skip this first part and go … | |
Here's a little program i wrote, i'm trying to pass my structure book to function input. The code works fine on Code::Blocks but VS12 is giving an error on compliation " error C4700: uninitialized local variable 's' used ". What i'm doing wrong? #include <string.h> #include <iostream> using namespace std; … | |
The insert function int the arrayList is not working...d[count] = v is giving garbage.I am unable to find the problem.Can anybody please help. class ArrayList { private: int count; int *d; public: ArrayList(int size=2) { d=new int[size]; count = 0; } void insert (int r) { d[count] = r; count++; … | |
This fuction of insert in descending order is not working.Can't find the problem.Can anyone help? class LinkedList { private: class ListNode { public: int data; ListNode *next; ListNode(int d) { data=d; next = NULL; } }; ListNode *head; public: LinkedList() { head=NULL; } void Inorder(int d) { ListNode *tmp = … | |
#include <iostream> #include <conio.h> using namespace std; int main(){ char command[1024]; char newchar; cout << "Command Line Interface Test with Intellisense" << endl; cout << endl; newchar = _getch(); command = command + newchar; } My Code. It doesn't work. `command = command + newchar` has a problem. Please help. | |
please give me a code of multiple linked queue in data structure using c++ | |
I have a text file below that I read from. 0123456789012345678 IN NUMBER LOOP LD NUMBER BZ LPEND LD TOTAL ADD ONE STO TOTAL LD ZERO SUB NUMBER BGTR ENDIF BZ ENDIF LD POSITS ADD ONE STO POSITS ENDIF IN NUMBER B LOOP LPEND LD POSITS MPY HNDRD DIV TOTAL … | |
i am not able to connect to the sql server on my system. SqlConnection^ connection=gcnew SqlConnection(); connection->ConnectionString ="Data Source=blueboy\sqlexpress;Initial Catalog=DCV_DB;Integrated Security=SSPI;Pooling=False"; i got the string from database properties.(i have attached the same in this post) sql service is running. tcp ports are enables too. | |
Please help me with this error. Thank you in advance [Linker error] undefined reference to `Simple_window::Simple_window(Point, int, int, String const&)' | |
Write a complete C++ program that reads the attached file (values.txt) to find and print the following: a. The average value of the numbers in the file. b. The maximum and minimum value c. The count of negative and positive values (ignore zero) #include <iostream> #include<fstream> using namespace std; int … | |
I tried all possible test cases and It outputed the correct answer , I wonder why UVA doesn't accept my answer <#include<iostream> #include <stdio.h> using namespace std; int main() { int i, j; unsigned long long int tempI, tempJ; int maxCaseLen = 1; int count = 1; while (scanf("%d %d", … | |
I am getting an error in the header file: class linkedStackType: public stackADT<Type> Can you see anything wrong with what I have, and why the compiler is complaining about "stackADT"? I would love it if you could give me some insight into this matter. Right now I'm only concerned about … | |
// This program uses the a queue template to create a queue of strings. #include <iomanip> #include <iostream> #include <cstdlib> using namespace std; // // TO CREATE A "template" class named "T" template <class T> // // TO CREATE A CLASS NAMED "Dynque" class Dynque { private: struct QueueNode { … | |
{file has 1000 lines that look like these 114680858 19670607 Matilda Vincent MI 114930037 19471024 Desdemona Hanover ID 115550206 19790110 Xanadu Perlman ND 116520629 19630921 Alexander Hall SD 117050976 19301016 David Lamprey GA 119610646 19650202 Thomas Porlock IL 120330928 19621126 Cary Cartman NC struct employees { int ss_number;//social security int … | |
Hello, I have a bug in my program somewhere and I cannot understand why. The program merely prints data from a binary file. Here is the code: #include <iostream> #include <fstream> #include <vector> #include <cstdint> using namespace std; int main(int argc, char *argv[]) { if (argc!=2) { cout<<"Invalid argument count, … | |
i am trying to overload +operator to concat 2 strings i tried to write a code but it is giving 2 errors and i am also not sure whether logic is correct..MY CODE is [CODE]#include<iostream.h> #include<conio.h> #include<string.h> class string { char *str; public: string() { cout<<"enter string"; cin>>str; } void … | |
I hve sme doubt in pseudo code I hve created da flow chart and c++ code but I need to create pseudo code I dnt no hw to create it Becz da flow chart hve 2 inputs such as cot=0, ans='y' And 5 option such as add inquiry , view … | |
Hello, I have the following problem: Entering coordinates of points on a plain with keyboard (as rows x,y). Analysing this coordinates. Replacing coordinates in vector (point - structure data type). Then calculating distance from the first point to all another points. I've written the code of this problem using arrays … |
The End.