Managed C++ And C++/CLI :: Designing GUI - Ambiguous Symbol String Used

Jan 10, 2014

I am working on my project of gesture recognition using c++ and open cv and i am also designing GUI simultaneously. I am using system namespace for GUI part and cv namespace for gestures.

After compiling i am getting error as Ambiguous symbol String is used.

This the link for msdn error support : [URL] .....

View 5 Replies


ADVERTISEMENT

Visual C++ :: Ambiguous Symbol Error

May 28, 2013

Here is the error I am getting:

1>d: estprojectgdiplusrenderer.h(61): error C2872: 'Font' : ambiguous symbol
1> could be 'c:program files (x86)microsoft visual studio 10.0vcincludecomdef.h(312) : Font'
1> or 'c:program files (x86)microsoft sdkswindowsv7.0aincludegdiplusheaders.h(244) : Gdiplus::Font'

How can I fix this issue?

View 2 Replies View Related

Managed C++ And C++/CLI :: Class Of String Collections?

Nov 25, 2014

Is it legal in VC++ to create a class composed only of string colections. If it is how can I create it in VC++ and add it to my project?

View 6 Replies View Related

C :: Read A String With & Symbol

Nov 26, 2013

Why is this correct?

Code:
char str[10];
scanf("%s",&str);

I knew that when we have strings we should not use & in scanf()...

View 1 Replies View Related

C++ :: Find String To Erase Symbol From The End Of A Word

May 2, 2013

I'm trying to use the find string to erase a ' ' from the end of a word. I tried something along the lines of:

if (SecondSide.find('
')!= string::npos)
SecondSide.erase(SecondSide.find('
'));

but it had no effect.

View 7 Replies View Related

C++ :: Designing Object In Solidworks -> OpenGL?

Jul 11, 2014

If I wanted to design an object in SolidWorks, and then output that object (I guess as a .stl file), is it possible to open that up and manipulate using openGL? How would I go about doing that?

View 1 Replies View Related

C++ :: Bool Algebra - Designing Database Query

May 15, 2012

I am designing a database query and need simplification to the algebra:

Code:
((x > u) && (x < y)) || ((z > u) && (z < y)) || ((u > z) && (y < x))

And these are always true:

Code:
z > x
u > y

It's a range overlap algorithm.

View 4 Replies View Related

C++ :: Develop Month Calendar By Designing A Class - Inheritance And Composition

Nov 10, 2014

In this assignment the student should develop a month calendar by designing a class called calendarType . This class uses two other classes (dateType and dayType) as described below:

1. dayType Class: This class has been designed by students in Lab1 exercises. Referee to it.
2. dateType Class: This class is designed and implemented to keep track of data. This class has been provided it to you. Study it first then add definitions and implementations of the following operations to this class:

- Test whether the year is a leap year. Leap year is identified by 3 criteria :
- The year is evenly divisible by 4;
- If the year can be evenly divided by 100, it is NOT a leap year, unless;
- The year is also evenly divisible by 400. Then it is a leap year.
- Return the number of days in the month. For example, if the date is 12/3/2014, the number of days to be returned is 31 because there are 31 days in March.
- Return the number of days passed in the year. For example, if the date is 18/3/2014 the number of days passed is 77. Note that the number of days returned also includes the current day.
- Return the number of days remaining in the year. For example, if the date is
18/3/2014 , the number of days remaining in the year is 288.
- Calculate the new date by adding a fixed number of days to the date. For example, if the date is 18/3/2014 and the days to be added are 25, the new date is 12/4/2014.

To print monthly calendar using calendarType class, you must know the first day of the month and the number of the days in that month. Thus, you must store the first day of the month, which is in the form of dayType and the month and the year of the calendar. Clearly, the month and the year can be stored as an object of the form dateType by setting the day component of the date to 1, and the month and year as specified by user.

Design the class calendarType so that the program print a calendar for any month starting 1/1/ 1500 which is Monday. To calculate the first day of a month, you can add the 2 appropriate days to Monday of January 1, 1500. For this class identify and implement the following operations:

- Determine the first day of the month for which the calendar will be printed. Call this operation firstDayOfMonth.
- set/get month.
- set/get year.
- Print calendar for particular month.
- Add the appropriate constructors to initialize the member variables.
- Write a test program to print the calendar for either a particular year or a particular month.

View 1 Replies View Related

Managed C++ And C++/CLI :: How To Create EXE File To Run It On Any Window

May 11, 2014

I have created a MFC application on Visual c++ 2012. My computer work in Win 7 - 64bits. When I see many tutorial about making the executable file which is independent on .dll library (by changing Configuration Properties ->C/C++->Code Generation->Runtime Library ->Multi Threaded Deburg (MT/d)) the compiler becomes error then I can not get the result as tutorial on internet.

Is there any other way to make the .exe file for this?

View 4 Replies View Related

Managed C++ And C++/CLI :: Message Loop In Windows Forms

May 13, 2014

I'm trying to port a Win32 application over to Windows Forms so that I can have better graphical control over the interface. The program itself is pretty simple; in the main message loop it listens for a WM_CopyData containing a certain char array, and occasionally sends WM_CopyData itself after the user clicks a certain sequence of buttons.

I found a couple of pages discussing how to completely override the Windows Forms WndProc, but I rather like having the framework do all of the control and would prefer to only latch onto it, rather than replace it. So, what would be the best way to have a Win Forms application listen for Windows Messages continuously and execute a function upon receiving them?

If I do need to override WndProc, what is the syntax? I found the following code:

Code:

protected override void WndProc(ref Message m) {
base.WndProc (ref m);
if (m.Msg==0x4a) // WM_COPYDATA {
// do your stuff here...
}
}

But when I stick that into my main.cpp file right after int main function, "protected" gets highlighted as a syntax error with the message "IntelliSense: expected a declaration".

View 8 Replies View Related

Managed C++ And C++/CLI :: Opening Forms With Buttons From Form 1 (With Conditions)

Jun 12, 2014

I'm pretty much newbie in creating a successful GUI in C++. Although, i managed to create 4 buttons that should show a certain form. Lets say, Form1 is my main form, therefore - Button 1 will open Form2, and Button 2 will open Form3..... But the conditions is - If there is a form that is already open, clicking again on the Button that should open it, will Close it, but all the forms (form1,2,3,4,5) can be enabled together.

Also, a very important note is that whenever i close a form, in any way of closing it (Not the main form) It will "save" the changes i made (Such as ticking checkboxes and so..) and won't reopen it, it will just use "Visible" i guess ?

Notes :

If i use Form2 ^form2show = gcnew Form2;

and then Form2->Show();

I will be able to simply ATTACK the button and open Billions of form2 ^_^

Although, when i use Form2->ShowDialog();

It won't let me open the form3,4,5.

Which isn't so bad, but when i exit from the form2, it won't save my changes (Such as checkboxes..)

View 6 Replies View Related

Managed C++ And C++/CLI :: How To Use Open File Dialog With Multiple Files

Dec 21, 2014

Right now, I have and application that opens a multi file dialog box. I want to take all of the files I highlight when the dialog box shows up and display a messsage box with the path and file names. This is what I have right now:

Code:
private: System::Void button1_Click_1(System::Object^ sender, System::EventArgs^ e) {
String^ folderName;
Stream^ myStream;
OpenFileDialog^ openFileDialog1 = gcnew OpenFileDialog;
openFileDialog1->Multiselect = true;

[Code] ....

Currently, it only shows the first file that I choose. I want to make it so that the message box shows all of the files that I select when the open file dialog shows up.

View 2 Replies View Related

C++ :: Reference To Column Is Ambiguous

Feb 18, 2014

I'm using GCC 4.8.1 and I want to implement a XML parser using TinyXML and port it to AngelScript

Now, it says: reference to 'Column' is ambiguous

I've declared a class called xml_parser and I've added everything of tinyxml as it's public member when I call Column(), and also Row(), it give's this error. what should I do?

This is it's code:

xml_parser.hpp:
#ifndef AGK_XML_PARSER_H
#define AGK_XML_PARSER_H
#define TIXML_USE_STL
#include <tinyxml.h>

[Code] .....

View 16 Replies View Related

Managed C++ And C++/CLI :: Breaking Up Large Class Into Manageable Source Files?

Feb 9, 2015

I'm trying to make sure my code is written in smaller modules, so my first step is to create my initialization process in and external file to load the necessary data from external sources and set up things like the content of drop down list boxes.

My first attempt failed to give me access to the combobox items add function so I moved that code back into the form1.h file:

Code:
public:
Form1(void) {
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
void AddDate(char *date, int ID)
{
this->comboBox1->Items->Add("line 1");
}

It compiles fine, but the call to it in my Initialize.cpp file

Code:
MarketView::Form1::AddDate("abs",1);
Gives error C2352: 'MarketView::Form1::AddDate' : illegal call of non-static member function

OK, so I change "void AddDate" to "static void AddDate" and now get the error that "static member functions do not have 'this' pointers" so I go back to the "MarketView::Form1::comboBox1" situation where there is no legal syntax after "Box1 to get me to Items->Add

I've been an old fashion programmer for over 47 years. It seems as is the concept of programming computers has changed from the concepts of logic to memorization of complex syntax.

There has to be a simple answer to do this other than to write thousands of lines of code in one Form1.h file. I refuse to believe that the new programming concepts will not allow you to write code in smaller more manageable modules.

What is the proper syntax for breaking up the larger file into more manageable chucks?

View 12 Replies View Related

Managed C++ And C++/CLI :: App That Shows Pixelated Picture In Window - Reference Image On Screen?

Jan 11, 2014

I am developing an app that shows a pixelated picture in a window. I am trying to capture the image, which is composed of a number of tiles processed from a mother image, but I am having difficulty since I can't reference the image on the screen. I have placed a rectangle around the image and my understanding is that I have get the window handle for the rectangle in order to save the Image as a jpg file. In the literature there is something about a Device Context and a window handle but my compiler throws out HWND and I don't really understand the device context. I am using Windows Forms, not native code.

View 6 Replies View Related

C++ :: Error Initializing Map - Ambiguous Operator

Feb 9, 2014

Okay so inside my ArcherArmor.cpp, I'm trying to figure out why the map initializer list isn't working, but for some reason I keep getting "Error C2593: 'operator =' is ambiguous". Here is my code:

I also have a class which ArcherArmor is derived from, that has a struct called `Armor`, which I left out for simplicity. The main problem is that error! The only thing I can think of is that im initializing the map wrong.

//ArcherArmor.h
#include <string>
#include <map>
class ArcherArmor {
private:
map <int, Armor> soldier_armor;
public:
void ArcherArmor_shop();

[Code] .....

View 7 Replies View Related

C++ :: Errors About Types - Ambiguous Call

Nov 6, 2013

Code:
void write() {
setlocale(LC_ALL, "en_US.UTF-8");
cout <<"";
}
template <typename A, typename ...B>
void write(string argHead, B... argTail) {
setlocale(LC_ALL, "en_US.UTF-8");

[Code] ....

what I'm doing wrong with my write() function? I did like the read() function(for work diferent with another types) but i get these error:

"C:UsersJoaquimDocumentsCodeBlocksMy Classconsole.h|218|error: call of overloaded 'to_string(char*&)' is ambiguous|"

View 14 Replies View Related

C++ :: Stubbing Standard Function - Ambiguous Call

Dec 4, 2013

I need to make a stub for some standard library function, but the compiler gets confused about which function I want to call in my code. I thought that putting the stubbed function together with its caller into an anonymous namespace will give higher precedence to the stub, but it didn't.

Here is an example code:

#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <signal.h>
namespace{
int sigaction(int signum, const struct sigaction * act, struct sigaction * oldact)

[Code] ....

Result:
main.cpp: In function ‘void {anonymous}::test()’:
main.cpp:23:47: error: call of overloaded ‘sigaction(int, sigaction*, NULL)’ is ambiguous
main.cpp:23:47: note: candidates are:
main.cpp:8:5: note: int {anonymous}::sigaction(int, const sigaction*, sigaction*)
In file included from main.cpp:4:0:
/usr/include/signal.h:266:12: note: int sigaction(int, const sigaction*, sigaction*)

It possible to force the compiler to use my stubbed version of sigaction() and if yes, how to do that? I am not allowed to modify test() function.

View 4 Replies View Related

C++ :: Invalid Conversion Error - Ambiguous Typecast

May 4, 2013

The compiler keeps on telling me that invalid conversion from wxBitmap* to wxString on the line with the AddTool function, whiles I do not even try to do such an ambiguous typecast.

wxWidgets 2.9.4
MinGW
gdb

Code:

#include "mainwnd.h"
//namespaces

//other definitions and declarations
CMAINWND::CMAINWND(const wxString& szTitle):wxFrame(NULL,wxID_ANY,szTitle) {
wxImage::AddHandler(new wxBMPHandler);

[Code] .....

View 8 Replies View Related

C++ :: Templates / Multiple Inheritance And Ambiguous Overloads?

Jan 15, 2014

Let's say I have a templated base class:

Code:
template <typename Input>
class Consumer
{
public:
void consume(Input input)
{
// do something
}
};

Now, I have a class which derives from this twice (A and B are unrelated, but otherwise unimportant classes):

Code:
class A;
class B;
class Derived: public Consumer<A>, public Consumer<B>
{
};

Now, elsewhere in the code I do this:

Code:
{
A myA;
Derived myDerived;
myDerived.consume(myA);
}

This looks like it should be simple enough, but g++ 4.8.1 is giving me a "request for member is ambiguous" error.

View 2 Replies View Related

C++ :: Ambiguous Call On Overloaded Variadic Template Operators

Oct 30, 2013

When compiling the code

#include "tensor.h"
int main() {
Tensor<2,-2> m = {{1,2},{1,3}};
Tensor<2> v = {1,5};
std::cout<<m*v<<"

[Code] ....

Why do I get an ambiguity and why is not the wanted operator*-overload (the last one in the tensor.h file) not even mentioned as one of the candidates? Is it clear what I want to do? And if so, what can I do to make the call unambiguous?

View 3 Replies View Related

C++ :: Call To Member Function X Is Ambiguous - Overloaded Member From Header File

Feb 23, 2014

I get the following error in XCode whenever I try to access the member I created 'randomGen' in a separate class in a different header file. I have made sure to include the header file and have tried to access it through an object.

This is the code I enter when trying to access the method from randomiser.h in main.cpp. It is also an overloaded function with doubles and integers:

RandomG randomiser;
randomiser.randomGen(); // 'Call to member function 'randomGen' is ambiguous'

This is the code inside randomiser.h:

#include <string>
#include <iostream>
using std::string;
using std::cout;
using std::endl;
class RandomG {

[Code] ....

This is the error inside xcode: [URL] ....

I have tried seperating the code for the functions in another class (main.cpp) and then running and it seems to works, so I'm not sure why I can't put everything in the .h file and then access it?

I would like it in a seperate file so it doesn't clutter my main. I am writing a game with SDL so that might be confusing and I would like the window to have a random title and other random properties, so it would be easier to use a function.

View 3 Replies View Related

C++ :: No Constructor Could Take Source Type Or Constructor Overload Resolution Was Ambiguous

Mar 1, 2014

i am writing this bank accounts program using structures. i haven't implemented the function before that i want to check if the data is being read and printed. When i build and run the program in visual studio it gives me the following error. "No constructor could take the source type, or constructor overload resolution was ambiguous". Now whats wrong in this program?

/* Bank Accounts Program */
#include <iostream>
#include <string>
#include <fstream>
#include <cstdlib>//needed to use system() function
using namespace std;
const int MAX_NUM = 50;
struct Name{

[code]....

View 1 Replies View Related

C++ :: X And O Symbol Generation

Mar 5, 2013

I have program. I need programing one game.

char girl;
char computer;
cout << "Girl choose one of symbol x or o";
so girl choose x.

problem : i need random symbol genetation. so if random symbol are x, than girl start play. if random symbol ar o, than computer start game. who to do this?

View 1 Replies View Related

C++ :: What Is Symbol For Divide

Jan 25, 2013

Whats the symbol for divide In C++

View 10 Replies View Related

C :: Occurring Symbol Per Line?

Dec 17, 2014

I want to get the occurence of the symbol ';' for each line of this C program. I type the name of the file Source.c and try to count the occuring symbol, but i am getting the value for ALL of the ';' for each line.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>/* For exit() function */
int main()
{
char file_name[150];
FILE *file2 = 0;
gets(file_name);

[code]....

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved