Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I'm pretty new to Xcode so I apologize if this is a very simple question. I'm trying to get the OpenCV Xcode sample code to compile and run, but I've been running into a lot of errors.The first problems were all about locating files so I changed the paths to fix this. Unfortunately after fixing those there's now another one that I don't know how to fix. The line of code:
CvCapture pCapture = 0;
produces an error, "Variable has incomplete type 'CvCapture'."
I've made sure that CcCapture is defined so I'm not sure what the problem is. I'm currently using Xcode 4.6. If you have any experience with Xcode or OpenCV and know how to fix this I would really appreciate it!
You probably want:
CvCapture* pCapture = 0;
because
typedef struct CvCapture CvCapture;
The structure CvCapture does not have public interface and is used only
as a parameter for video capturing functions.
http://www.ai.rug.nl/vakinformatie/pas/content/Highgui/opencvref_highgui.htm#highgui_video
Related
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
This is used here do {....} while(ch!=?.?); what does ch!=?.? mean here can anybody please help with it.
It's a syntax error with both clang and gcc.
#JonathanLeffler is usually right and I think he nailed the root cause. I used to see this when text was being copied from Microsoft Word to the web (lack of transcode from a Windows code page to ascii/utf8?).
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
I'm currently reading a c++ book and one of the function is
void fp(char v[]){
for(char* p = v; *p!=0;p++) use(*p);
}
I wrote this into my editor and compiled it. I also included the headers
#include <iostream>
#include <string.h>
But my terminal returns the following message:
use of undeclared identifier 'use'
I also google it and its nowhere to be found online, the function doesn't exist.
That's because there is no such standard library function.
The author is either using pseudo-code here, or has defined this function somewhere else in the book.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 3 years ago.
Improve this question
My code was converted to these random characters at some point after I saved my program using Vi. I did this project for a grade in one of my college courses and didn’t get any credit, despite the fact that I spent hours working on my code for this to happen. If anyone knows how to convert it back to C++ I would be thankful.
Turns out I had saved my file under the wrong folder and I was able to recover my original file. Thanks to all for helping out with this! It seems like it always tends to be something so simple...
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I am extremely new to programming (my second week in) and I am trying to understand why when I start without debugging, I keep receiving this error message!
I only receive one error and it is the "c2059" 'return' error code.. It's not descriptive at all, so I have no idea what I did wrong.
I have a picture link available below through google drive to show my code. Any help offered is greatly appreciated!
https://drive.google.com/file/d/0B5hXFZn11VsudXBXRlI3Vjg1OEU/view?usp=sharing
I am also fairly new to this site, if I am breaking any formal etiquette, please let me know as well..
I am using Microsoft Visual Studio 2008.
You have some stray text (endl/) at the end of the second last line, which is causing a parsing error.
You also appear to have typed return o; (the letter "o") - as you don't have a variable called o this will also cause an error. I suspect you meant return 0; instead.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
double testpower;
testpower = pow(400,-9);
testpower giving me 3.8146972656250003e-024 which is different calculator output of 4E-7
Anyone have any idea why??
calculator output of 4E-7
You entered the wrong calculation into your calculator.
You entered 400×10-9, instead of 400-9.
These are absolutely not the same thing!
The C++ program is correct: pow(400, -9) calculates 400-9, which is approximately 3.815×10-24.
Here is some further reading for you:
http://en.wikipedia.org/wiki/Scientific_notation#E_notation
4E-7 seems like you accidentally input 400 * 10^-9 or 400E-9.
You're looking for 400^-9, which should give 3.8146972656250003e-024.
The result you are getting 3.8146972656250003e-024 is completely correct. Maybe your calculator does not have that precission and that is why you are getting that error. Try to do 1/400^9.
I just tested 400^(-9) on the Windows calculator tool and I got the same output as your program. I think the program is fine, it may be your manual calculation that is the problem here.