49,761 Topics

Member Avatar for
Member Avatar for goluman

I am a beginner in openCV and C++ as well.I am stuck in a particular place while trying to implement face recognition in open cv. I have the stored training images in a folder called data the images of first person is stored like 1_john1.pgm 2nd image of first person …

Member Avatar for goluman
0
1K
Member Avatar for jimFan

Dear all, I experienced an unexpected error when using getline() to get input from a file like this: a.out < inputFile Part of the code is shown below [CODE] ........ while (true) { cout << "Enter a command: "; getline(cin, input); cout << input << endl; } ......... [/CODE] The …

Member Avatar for p9v9n261
0
459
Member Avatar for Mahkoe

I've been coding in c++ for a while now, and I use string variables quite a lot. One day, I stumbled upon a char* which can also be used to "store" a string of characters, and it's been bothering me ever since that I don't really know what a string …

Member Avatar for Mahkoe
0
179
Member Avatar for creative_m

I want to define a vector of TextBox (or any compnents) in VC++ project (windows form). I wrote : [code] std:vector <TextBox^> txt_box; // //then I push the elements back in the vector using txt_box.push_back (textbox1) // //... // for all the text_boxs in my form [/code] but this code …

Member Avatar for Ancient Dragon
0
289
Member Avatar for aiwasen

The problem is this. I try to enter the limit of at least 34 fibonacci numbers but the limit display the limit of 89. [CODE]#include <iostream> using namespace std; int main() { int x=0,y=1; int num; cout<<"Enter number:"; cin>>num; cout<<x<<" "<<y; while(y<=num) { x= x + y; y= y + …

Member Avatar for HASHMI007
0
182
Member Avatar for Daita
Member Avatar for Kerlix

I've found a simple timer program and it seems to work (for the most part). The problem is that certain cout functions aren't showing up. The timer originally didn't include milliseconds in the code, so I added them myself (which could be the problem) based on the code for the …

Member Avatar for Kerlix
0
286
Member Avatar for aomas98

sample output... ex.1 enter a number: 5 ***** ***** ***** ***** ***** ex2. enter a number: 2 ** **

Member Avatar for Rashakil Fol
-2
175
Member Avatar for reallyslick

I have about 50 different tags, each is at most 2 chars in lengnth. depending on the input of the user a combination of tags will be joined together into one large string. Is there a simpler/more efficient way then having 50 different if-statements? for that matter, how is a …

Member Avatar for reallyslick
0
184
Member Avatar for MareoRaft

1. In a for or while loop, if the condition is breached in the middle of the brackets {}, will the code immediately stop the loop, or wait until it gets to the bottom of the brackets {} ? 2. If a function is called in my code, does the …

Member Avatar for svilla
0
94
Member Avatar for amitmardana
Member Avatar for hqt

I'm using DevC++ 4.9.9 and have a problem while I'm debugging: I want to view array C so I will: press F4 and type C. but for my example: if my code is: [CODE]for(i=1;i<=10;i++) for(j=1;j<=10;j++) c[i][j]=10;[/CODE] the left panel (that I saw value) will have 100 line of C. (each …

Member Avatar for pseudorandom21
0
142
Member Avatar for Peter4n31

Memory Validator reports a problem: Accessing C++ object functions with a pointer to a deleted object. It is pointing to prefDir = preferredPath; in Loader.h Public: is defined: [CODE] std::vector<std::string> preferredPaths; [/CODE] in Loader.ccp [CODE] CDirLoader::GetFileExtHandle(not related params) std::string prefDir; for(size_t i=0;i<preferredPaths.size();++i) { const std::string& preferredPath=preferredPaths[i]; if (!preferredPath.empty()) prefDir = …

Member Avatar for Narue
1
155
Member Avatar for deliezer

Hi I am trying to write something that compiles and runs correctly on both Linux and Windows. I am running bash in Ubuntu on Linux, and I try to set environment variables in the makefile just before the compile lines. I then write something in the code like [CODE] int …

Member Avatar for deliezer
0
2K
Member Avatar for eoop.org

Hi, i want to make a own linux os. Does someone know where to get the opensoruce?

Member Avatar for eoop.org
0
130
Member Avatar for hqt

I'm sorry because I think this is a popular fault but I haven't found why it happened yet. this is a code that has that fault: [CODE] void readfile(){ FILE *f; int u,v; f=fopen(fi,"r"); fscanf(f,"%d%d%d%d",&n,&m,&s,&t); for (int i=1;i++;i<=n) for (int j=1;j++;j<=n) c[i][j]=(i!=j)? Oo:0; for(int i=1;i++;i<=m) fscanf(f,"%d%d%d",&u,&v,&c[u,v]); fclose(f); } [/CODE] when …

Member Avatar for hqt
0
618
Member Avatar for riotburn

I am writing a polynomial class but the code I have written to overload the ostream operator<< goes into a infinite loop for the first term. I tried to step through but Visual Studio 2010 goes into linker(?) code instead of only stepping through my code. (How to change the …

Member Avatar for riotburn
0
115
Member Avatar for Ronene

Hi guys, I need to create two separate applications in C++ , where the first application is a window , and the second application has a button and it needs to close the first window. Both applications must be two separate programs ! [B]I can't use FindWindow()[/B] therefore , I …

Member Avatar for JasonHippy
0
226
Member Avatar for MareoRaft

when I... [CODE]double a = 0.00000001; cout<< a <<endl;[/CODE] The computer outputs 1e-07. I want to force the computer to write it as 0.00000001 thanks! ;)

Member Avatar for MareoRaft
0
195
Member Avatar for sadsdw

Hi there, I need to change columns to rows and vice-versa. Example: 1001 AA AB AC AD 1002 CC DD EE FF 1003 AA BB CC CC 1004 DD DD DD DD to 1001 1002 1003 1004 AA CC AA DD AB DD BB DD AC EE CC DD AD …

Member Avatar for sadsdw
0
219
Member Avatar for rluo502

Hi, I am writing a code to sort a list of C-strings in a 2-D array. I'm a beginner and it isn't working out. The program crashes every time. After running a bit of testing, I found that the for loop in my sort function is not incrementing the variable …

Member Avatar for vmanes
0
229
Member Avatar for sadsdw

Hi friends, I'm looking for an efficient method to transpose rows and columns from a BIG file. I wrote this code but is very inefficient. In that, I'm closing and opening a file many times. (// #*#) Could anyone help me please? Thanks a lot! [CODE] ifstream testTranspose; testTranspose.open("data.txt"); int …

Member Avatar for Ancient Dragon
0
140
Member Avatar for singaiah39

Hi All, We have some problem in calling Peernet TIFF printer. Issue: We want to send TIFF images to Peernet printer and convert them to get new TIFF images. We used ShellExecute functionality to send the TIFF files and create the new TIFF files. But every time, dialog box is …

0
82
Member Avatar for afi@alvi

Hi! All.. It is asked that Can a C++ programme be converted to an i-phone app?, by means of any converter or something like that.

Member Avatar for mrnutty
0
190
Member Avatar for josh327

Hey guys, I'm trying to make an elevator simulator. It shouldn't be anything complex; just a basic 4 story building. Also, the highest level of coding used should just be structures and pointers. I need help as to where I should start.

Member Avatar for Narue
0
92
Member Avatar for mrnobody

Hi, I get "error LNK2005:" when I build my source code. Below is what I did: Main.cpp [CODE]#include Main.h Function();[/CODE] Main.h [CODE]#include "File1.h" //#include "File2.h"[/CODE] File1.cpp [CODE]#include "File1.h" void Function() { // Do something }[/CODE] File1.h [CODE]extern void Function()[/CODE] File2.cpp [CODE]#include "File2.h" void Function() { // Do something }[/CODE] File2.h …

Member Avatar for pseudorandom21
0
97
Member Avatar for AshfaqueIW

Hi all, I have a application which is completely written in C++. I got one review comment that normal class methods should not have any static variables and i am advised to move that variable inside class. I want to know what will be advantage of keeping the static variables …

Member Avatar for JasonHippy
0
228
Member Avatar for EddieC

Craigslist hosts classified ads of all kinds, including lengthy lists of [url=http://newyork.craigslist.org/sof/]developer's jobs in New York[/url] and the [url=http://sfbay.craigslist.org/sof/]San Francisco Bay area[/url]. But another type of job listing was in the spotlight today, and it's nice to know there's at least [i]one[/i] person out there who's thinking clearly. A judge …

Member Avatar for maile15
0
569
Member Avatar for suraj_p

When i run this program it takes more values and prints less values.... this runs on Dev C++([url]www.bloodshed.net[/url]) [CODE]#include<iostream> using namespace std; #include<conio.h> int main() { int arr[5][5],i,j,k,l; cout<<"Enter matrix row wise"; for(i=0;i<=3;i++) { for(j=0;j<3;j++) { cin>>arr[i][j]; } } for(k=0;k<3;k++) { for(l=0;l<3;l++) { cout<<" "<<arr[k][l]; } printf("\n"); } getch(); } …

Member Avatar for suraj_p
0
177
Member Avatar for ztdep

[CODE]// // DiffusionTerm.h define the equation class to be solved. // #ifndef DIFFUSIONTERM_H #define DIFFUSIONTERM_H #include<vector> #include<iostream> using namespace std; class Equation; class DiffusionTerm { private: Equation* pEquation; public: DiffusionTerm(Equation* _pEquation ){pEquation=_pEquation; }; ~DiffusionTerm(){}; vector<double>Coe; vector<double>source; void evaluateCoeAndSource( ) { vector<double>& ThermalConductivity= pEquation->pMedia->getThermalConductivity() ; } }; // // Equation.h define …

Member Avatar for ztdep
0
255

The End.