Search Results

Search found 1608 results on 65 pages for 'declaration'.

Page 10/65 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Acer dit qu'il ne lancera pas de netbook sous Chrome OS, doit-on croire cette déclaration ?

    Mise à jour du 19.05.2010 par Katleen Acer dit qu'il ne lancera pas de netbook sous Chrome OS, doit-on croire cette déclaration ? Acer a finalement démenti être en passe de présenter un netbook tournant sous Chrome dans quelques jours, à l'occasion du Computex de Taïpeï (du 1er au 5 juin). C'est le site VentureBeat qui avait lancé la rumeur de l'arrivée d'un tel produit lors de cet évènement, et l'appareil était depuis attendu de pied ferme. Le constructeur taïwanais a donc réfuté travailler sur un tel produit...mais pas de manière définitive et sans appel. «Acer confirme aujourd'hui qu'il n'a aucun plan à court terme pour un tel produit », a déclaré un porte parole du groupe.

    Read the article

  • install wireshark 1.8.3 in ubuntu 12.04

    - by gene
    To enable capture traffic on multiple interfaces at once, I tried to install wireshark 1.8.3. However, I encountered the following errors: capture-pcap-util.c:274:1: error: static declaration of ‘pcap_datalink_name_to_val’ follows non-static declaration /usr/local/include/pcap/pcap.h:326:5: note: previous declaration of ‘pcap_datalink_name_to_val’ was here capture-pcap-util.c:289:1: error: static declaration of ‘pcap_datalink_val_to_name’ follows non-static declaration /usr/local/include/pcap/pcap.h:327:13: note: previous declaration of ‘pcap_datalink_val_to_name’ was here After doing some search, I found someone can fix it by reinstall libpcap-dev, or the following commands: step 1:rm & rmdir any file in '/usr/include/pcap';'/usr/local/include/pcap' step 2:Download libpcap by 'sudo apt-get install libpcap0.8-dev' step 3:./autogen.sh in wireshark dir step 4:make clean & make & make install However, neither is working on ubuntu 12.04/wireshark 1.8.3 Anyone can help?

    Read the article

  • Can someone explain the declaration of these java generic methods?

    - by Tony Giaccone
    I'm reading "Generics in the Java Programming Language" by Gilad Bracha and I'm confused about a style of declaration. The following code is found on page 8: interface Collection<E> { public boolean containsAll(Collection<?> c); public boolean addAll(Collection<? extends E> c); } interface Collection<E> { public <T> boolean containsAll(Collection<T> c); public <T extends E> boolean addAll(Collection<T> c); // hey, type variables can have bounds too! } My point of confusion comes from the second declaration. It's not clear to me what the purpose the <T> declaration serves in the following line: public <T> boolean containsAll(Collection<T> c); The method already has a type (boolean) associated with it. Why would you use the <T> and what does it tell the complier? I think my question needs to be a bit more specific. Why would you write: public <T> boolean containsAll(Collection<T> c); vs public boolean containsAll(Collection<T> c); It's not clear to me, what the purpose of <T> is, in the first declaration of containsAll.

    Read the article

  • How to use ASTRewrite split one field declaration into two?

    - by user307598
    For example: private long p, q, g, h; I want to split this field declaration as: private long p; private long q, g, h; How can I use ASTRewrite to do it? I tried to use ASTNode copyFd = rewriter.createCopyTarget(fd) to copy the field declaration, modify it, then add to field declaration list, but my modification on copyFd is not seen. It's just the same to fd. Why? Anybody can help?

    Read the article

  • Template inheritence c++

    - by Chris Condy
    I have made a template singleton class, I have also made a data structure that is templated. My question is; how do I make my templated data structure inherit from a singleton so you can only have one float type of this structure? I have tested both seperate and have found no problems. Code provided under... (That is the problem) template <class Type> class AbstractRManagers : public Singleton<AbstractRManagers<Type> > The problem is the code above doesn't work I get alot of errors. I cant get it to no matter what I do template a templated singleton class... I was asking for maybe advice or maybe if the code above is incorrect guidence? #ifndef SINGLETON_H #define SINGLETON_H template <class Type> class Singleton { public: virtual ~Singleton(); Singleton(); static Type* m_instance; }; template <class Type> Type* Singleton<Type>::m_instance = 0; #include "Singleton.cpp" #endif #ifndef SINGLETON_CPP #define SINGLETON_CPP #include "Singleton.h" template <class Type> Singleton<Type>::Singleton() { } template <class Type> Singleton<Type>::~Singleton() { } template <class Type> Type* Singleton<Type>::getInstance() { if(m_instance==nullptr) { m_instance = new Type; } return m_instance; } #endif #ifndef ABSTRACTRMANAGERS_H #define ABSTRACTRMANAGERS_H #include <vector> #include <map> #include <stack> #include "Singleton.h" template <class Type> class AbstractRManagers : public Singleton<AbstractRManagers<Type> > { public: virtual ~AbstractRManagers(); int insert(Type* type, std::string name); Type* remove(int i); Type* remove(std::string name); Type* get(int i); Type* getS(std::string name); int get(std::string name); int get(Type* i); bool check(std::string name); int resourceSize(); protected: private: std::vector<Type*> m_resources; std::map<std::string,int> m_map; std::stack<int> m_freePos; }; #include "AbstractRManagers.cpp" #endif #ifndef ABSTRACTRMANAGERS_CPP #define ABSTRACTRMANAGERS_CPP #include "AbstractRManagers.h" template <class Type> int AbstractRManagers<Type>::insert(Type* type, std::string name) { int i=0; if(!check(name)) { if(m_freePos.empty()) { m_resources.push_back(type); i = m_resources.size()-1; m_map[name] = i; } else { i = m_freePos.top(); m_freePos.pop(); m_resources[i] = type; m_map[name] = i; } } else i = -1; return i; } template <class Type> int AbstractRManagers<Type>::resourceSize() { return m_resources.size(); } template <class Type> bool AbstractRManagers<Type>::check(std::string name) { std::map<std::string,int>::iterator it; it = m_map.find(name); if(it==m_map.end()) return false; return true; } template <class Type> Type* AbstractRManagers<Type>::remove(std::string name) { Type* temp = m_resources[m_map[name]]; if(temp!=NULL) { std::map<std::string,int>::iterator it; it = m_map[name]; m_resources[m_map[name]] = NULL; m_freePos.push(m_map[name]); delete (*it).second; delete (*it).first; return temp; } return NULL; } template <class Type> Type* AbstractRManagers<Type>::remove(int i) { if((i < m_resources.size())&&(i > 0)) { Type* temp = m_resources[i]; m_resources[i] = NULL; m_freePos.push(i); std::map<std::string,int>::iterator it; for(it=m_map.begin();it!=m_map.end();it++) { if((*it).second == i) { delete (*it).second; delete (*it).first; return temp; } } return temp; } return NULL; } template <class Type> int AbstractRManagers<Type>::get(Type* i) { for(int i2=0;i2<m_resources.size();i2++) { if(i == m_resources[i2]) { return i2; } } return -1; } template <class Type> Type* AbstractRManagers<Type>::get(int i) { if((i < m_resources.size())&&(i >= 0)) { return m_resources[i]; } return NULL; } template <class Type> Type* AbstractRManagers<Type>::getS(std::string name) { return m_resources[m_map[name]]; } template <class Type> int AbstractRManagers<Type>::get(std::string name) { return m_map[name]; } template <class Type> AbstractRManagers<Type>::~AbstractRManagers() { } #endif #include "AbstractRManagers.h" struct b { float x; }; int main() { b* a = new b(); AbstractRManagers<b>::getInstance()->insert(a,"a"); return 0; } This program produces next errors when compiled : 1> main.cpp 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\stack(166) : see declaration of 'std::operator <' 1> c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(124) : while compiling class template member function 'bool std::less<_Ty>::operator ()(const _Ty &,const _Ty &) const' 1> with 1> [ 1> _Ty=std::string 1> ] 1> c:\program files\microsoft visual studio 10.0\vc\include\map(71) : see reference to class template instantiation 'std::less<_Ty>' being compiled 1> with 1> [ 1> _Ty=std::string 1> ] 1> c:\program files\microsoft visual studio 10.0\vc\include\xtree(451) : see reference to class template instantiation 'std::_Tmap_traits<_Kty,_Ty,_Pr,_Alloc,_Mfl>' being compiled 1> with 1> [ 1> _Kty=std::string, 1> _Ty=int, 1> _Pr=std::less<std::string>, 1> _Alloc=std::allocator<std::pair<const std::string,int>>, 1> _Mfl=false 1> ] 1> c:\program files\microsoft visual studio 10.0\vc\include\xtree(520) : see reference to class template instantiation 'std::_Tree_nod<_Traits>' being compiled 1> with 1> [ 1> _Traits=std::_Tmap_traits<std::string,int,std::less<std::string>,std::allocator<std::pair<const std::string,int>>,false> 1> ] 1> c:\program files\microsoft visual studio 10.0\vc\include\xtree(659) : see reference to class template instantiation 'std::_Tree_val<_Traits>' being compiled 1> with 1> [ 1> _Traits=std::_Tmap_traits<std::string,int,std::less<std::string>,std::allocator<std::pair<const std::string,int>>,false> 1> ] 1> c:\program files\microsoft visual studio 10.0\vc\include\map(81) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled 1> with 1> [ 1> _Traits=std::_Tmap_traits<std::string,int,std::less<std::string>,std::allocator<std::pair<const std::string,int>>,false> 1> ] 1> c:\users\chris\desktop\311\ideas\idea1\idea1\abstractrmanagers.h(28) : see reference to class template instantiation 'std::map<_Kty,_Ty>' being compiled 1> with 1> [ 1> _Kty=std::string, 1> _Ty=int 1> ] 1> c:\users\chris\desktop\311\ideas\idea1\idea1\abstractrmanagers.h(30) : see reference to class template instantiation 'AbstractRManagers<Type>' being compiled 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\stack(166) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::stack<_Ty,_Container> &,const std::stack<_Ty,_Container> &)' : could not deduce template argument for 'const std::stack<_Ty,_Container> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\stack(166) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\deque(1725) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\deque(1725) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::deque<_Ty,_Alloc> &,const std::deque<_Ty,_Alloc> &)' : could not deduce template argument for 'const std::deque<_Ty,_Alloc> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\deque(1725) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not deduce template argument for 'const std::_Tree<_Traits> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xtree(1885) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::vector<_Ty,_Ax> &,const std::vector<_Ty,_Ax> &)' : could not deduce template argument for 'const std::vector<_Ty,_Ax> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\vector(1502) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::vector<_Ty,_Ax> &,const std::vector<_Ty,_Ax> &)' : could not deduce template argument for 'const std::vector<_Ty,_Ax> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\vector(1502) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::vector<_Ty,_Ax> &,const std::vector<_Ty,_Ax> &)' : could not deduce template argument for 'const std::vector<_Ty,_Ax> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\vector(1502) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\memory(2582) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\memory(2582) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::unique_ptr<_Ty,_Dx> &,const std::unique_ptr<_Ty2,_Dx2> &)' : could not deduce template argument for 'const std::unique_ptr<_Ty,_Dx> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\memory(2582) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xutility(1356) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xutility(1356) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2> &)' : could not deduce template argument for 'const std::reverse_iterator<_RanIt> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xutility(1356) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xutility(1179) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xutility(1179) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2> &)' : could not deduce template argument for 'const std::_Revranit<_RanIt,_Base> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\xutility(1179) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\utility(318) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\utility(318) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2784: 'bool std::operator <(const std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not deduce template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const std::string' 1> c:\program files\microsoft visual studio 10.0\vc\include\utility(318) : see declaration of 'std::operator <' 1>c:\program files\microsoft visual studio 10.0\vc\include\xfunctional(125): error C2676: binary '<' : 'const std::string' does not define this operator or a conversion to a type acceptable to the predefined operator ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Read the article

  • Facebook Application Parse Error CSS

    - by madphp
    Hi, Im getting some parse erros when loading in my facebook app through the canvas. Its in an iframe. Can anyone tell me where I can start to look for documentation regarding this? Errors whilst loading page from application Parse errors: CSS Error (line 40 char 36): Error in parsing value for property.: 'font' Declaration dropped. CSS Error (line 183 char 18): Expected declaration. Skipped to next declaration. CSS Error (line 272 char 65): Unknown property.: '-webkit-border-radius' Declaration dropped. CSS Error (line 272 char 110): Unknown property.: 'border-radius' Declaration dropped. CSS Error (line 272 char 135): Unknown property.: '-webkit-box-shadow' Declaration dropped. CSS Error (line 272 char 181): Unknown property.: '-moz-box-shadow' Declaration dropped. CSS Error (line 272 char 221): Unknown property.: 'box-shadow' Declaration dropped. CSS Error (line 317 char 23): Unknown property.: '-webkit-border-radius' Declaration dropped. CSS Error (line 319 char 15): Unknown property.: 'border-radius' Declaration dropped. Thanks --Mark

    Read the article

  • How to transform a production to LL(1) for a list separated by a semicolon?

    - by Subb
    Hi, I'm reading this introductory book on parsing (which is pretty good btw) and one of the exercice is to "build a parser for your favorite language." Since I don't want to die today, I thought I could do a parser for something relatively simple, ie a simplified CSS. Note: This book teach you how to right a LL(1) parser using the recursive-descent algorithm. So, as a sub-exercice, I am building the grammar from what I know of CSS. But I'm stuck on a production that I can't transform in LL(1) : //EBNF block = "{", declaration, {";", declaration}, [";"], "}" //BNF <block> =:: "{" <declaration> "}" <declaration> =:: <single-declaration> <opt-end> | <single-declaration> ";" <declaration> <opt-end> =:: "" | ";" This describe a CSS block. Valid block can have the form : { property : value } { property : value; } { property : value; property : value } { property : value; property : value; } ... The problem is with the optional ";" at the end, because it overlap with the starting character of {";", declaration}, so when my parser meet a semicolon in this context, it doesn't know what to do. The book talk about this problem, but in its example, the semicolon is obligatory, so the rule can be modified like this : block = "{", declaration, ";", {declaration, ";"}, "}" So, Is it possible to achieve what I'm trying to do using a LL(1) parser?

    Read the article

  • How to transform a production to LL(1) grammar for a list separated by a semicolon?

    - by Subb
    Hi, I'm reading this introductory book on parsing (which is pretty good btw) and one of the exercice is to "build a parser for your favorite language." Since I don't want to die today, I thought I could do a parser for something relatively simple, ie a simplified CSS. Note: This book teach you how to right a LL(1) parser using the recursive-descent algorithm. So, as a sub-exercice, I am building the grammar from what I know of CSS. But I'm stuck on a production that I can't transform in LL(1) : //EBNF block = "{", declaration, {";", declaration}, [";"], "}" //BNF <block> =:: "{" <declaration> "}" <declaration> =:: <single-declaration> <opt-end> | <single-declaration> ";" <declaration> <opt-end> =:: "" | ";" This describe a CSS block. Valid block can have the form : { property : value } { property : value; } { property : value; property : value } { property : value; property : value; } ... The problem is with the optional ";" at the end, because it overlap with the starting character of {";", declaration}, so when my parser meet a semicolon in this context, it doesn't know what to do. The book talk about this problem, but in its example, the semicolon is obligatory, so the rule can be modified like this : block = "{", declaration, ";", {declaration, ";"}, "}" So, Is it possible to achieve what I'm trying to do using a LL(1) parser?

    Read the article

  • How can c let a function declaration with any parameter type ?

    - by kamil çakir
    it lets this function declaration print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i gives error in this situation 44 C:\Users.. previous implicit declaration of 'print' was here (print(size,table); call in main) void print(int size,int table[size][size]){ int i,j; printf("-------TABLE-------\n"); for(i = 0;i

    Read the article

  • adding virtual function to the end of the class declaration avoids binary incompatibility?

    - by bob
    Could someone explain to me why adding a virtual function to the end of a class declaration avoids binary incompatibility? If I have: class A { public: virtual ~A(); virtual void someFuncA() = 0; virtual void someFuncB() = 0; virtual void other1() = 0; private: int someVal; }; And later modify this function to: class A { public: virtual ~A(); virtual void someFuncA(); virtual void someFuncB(); virtual void someFuncC(); virtual void other1() = 0; private: int someVal; }; I get a coredump from another .so compiled against the previous declaration. But if I put someFuncC() at the end of the class declaration (after "int someVal"), I don't see coredump anymore. Could someone tell me why this is? And does this trick always work? PS. compiler is gcc, does this work with other compilers?

    Read the article

  • How to deal with forward declaration / #import in Cocoa Touch (Objective-C cross C++) correctly?

    - by unknownthreat
    I am trying to write this header file: //@class AQPlayer; //#import "AQPlayer.h" @interface AQ_PWN_iPhoneViewController : UIViewController { AQPlayer* player; } @end AQPlayer is a .mm file written in C++. I tried to make a class forward declaration here, but it complains to me: error: cannot find interface declaration for 'AQPlayer' So I tried to "#import" the header file instead, but it complains something completely off and weird. Here's a slice of the error complained: In file included from /Users/akaraphan/Desktop/SpecialTopic1/AQ_PWN_iPhone/Classes/AQPlayer.h:51, from /Users/akaraphan/Desktop/SpecialTopic1/AQ_PWN_iPhone/Classes/AQ_PWN_iPhoneViewController.h:12, from /Users/akaraphan/Desktop/SpecialTopic1/AQ_PWN_iPhone/Classes/AQ_PWN_iPhoneAppDelegate.m:10: /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:78: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CAStreamBasicDescription' /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:230: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:231: error: expected '=', ',', ';', 'asm' or '__attribute__' before '==' token /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:233: error: expected '=', ',', ';', 'asm' or '__attribute__' before '!=' token /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:234: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:235: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>=' token /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:236: error: expected '=', ',', ';', 'asm' or '__attribute__' before '>' token /Developer/Examples/CoreAudio/PublicUtility/CAStreamBasicDescription.h:239: error: expected ';', ',' or ')' before '&' token Am I missing something? Can't I do a forward declaration for this?

    Read the article

  • Implicit declaration when using a function before it is defined in C, why can't the compiler figure this out?

    - by rolls
    As the title says, I know what causes this error but I want to know why the compiler gives it in this circumstance. Eg : main.c void test(){ test1(); } void test1(){ ... } Would give an implicit declaration warning as the compiler would reach the call to test1() before it has read its declaration, I can see the obvious problems with this (not knowing return type etc), but why can't the compiler do a simple pass to get all function declarations, then compile the code removing these errors? It just seems so simple to do and I don't believe I've seen similar warnings in other languages. Does anyone know if there is a specific purpose for this warning in this situation that I am overlooking?

    Read the article

  • Merge functionality of two xsl files into a single file (continued.....)

    - by anuamb
    This is in continuation of my question: Merge functionality of two xsl files into a single file (not a xsl import or include issue) I have to merge the solution (xsl) of above question to below xsl: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <Declaration> <Message> <Meduim> <xsl:value-of select="/Declaration/Message/Meduim"/> </Meduim> <MessageIdentifier> <xsl:value-of select="/Declaration/Message/MessageIdentifier"/> </MessageIdentifier> <ControlingAgencyCode> <xsl:value-of select="/Declaration/Message/ControlingAgencyCode"/> </ControlingAgencyCode> <AssociationAssignedCode> <xsl:value-of select="/Declaration/Message/AssociationAssignedCode"/> </AssociationAssignedCode> <CommonAccessReference> <xsl:value-of select="/Declaration/Message/CommonAccessReference"/> </CommonAccessReference> </Message> <BeginingOfMessage> <MessageCode> <xsl:value-of select="/Declaration/BeginingOfMessage/MessageCode"/> </MessageCode> <DeclarationCurrency> <xsl:value-of select="/Declaration/BeginingOfMessage/DeclarationCurrency"/> </DeclarationCurrency> <MessageFunction> <xsl:value-of select="/Declaration/BeginingOfMessage/MessageFunction"/> </MessageFunction> </BeginingOfMessage> <Header> <ProcessingInformation> <xsl:for-each select="/Declaration/Header/ProcessingInformation/ProcessingInstructions"> <ProcessingInstructions> <xsl:value-of select="."/> </ProcessingInstructions> </xsl:for-each> </ProcessingInformation> <xsl:for-each select="/Declaration/Header/Seal"> <Seal> <SealID> <xsl:value-of select="SealID"/> </SealID> <SealLanguage> <xsl:value-of select="SealLanguage"/> </SealLanguage> </Seal> </xsl:for-each> <xsl:choose> <xsl:when test='/Declaration/Header/DeclarantsReference = ""'> <DeclarantsReference> <xsl:text disable-output-escaping="no">A</xsl:text> </DeclarantsReference> </xsl:when> <xsl:otherwise> <DeclarantsReference> <xsl:value-of select="/Declaration/Header/DeclarantsReference"/> </DeclarantsReference> </xsl:otherwise> </xsl:choose> <xsl:for-each select="/Declaration/Header/Items"> <Items> <CustomsStatusOfGoods> <CPC> <xsl:value-of select="CustomsStatusOfGoods/CPC"/> </CPC> <CommodityCode> <xsl:value-of select="CustomsStatusOfGoods/CommodityCode"/> </CommodityCode> <ECSuplementaryMeasureCode1> <xsl:value-of select="CustomsStatusOfGoods/ECSuplementaryMeasureCode1"/> </ECSuplementaryMeasureCode1> <ECSuplementaryMeasureCode2> <xsl:value-of select="CustomsStatusOfGoods/ECSuplementaryMeasureCode2"/> </ECSuplementaryMeasureCode2> <PreferenceCode> <xsl:value-of select="CustomsStatusOfGoods/PreferenceCode"/> </PreferenceCode> </CustomsStatusOfGoods> <xsl:for-each select="ItemAI"> <ItemAI> <AICode> <xsl:value-of select="AICode"/> </AICode> <AIStatement> <xsl:value-of select="AIStatement"/> </AIStatement> <AILanguage> <xsl:value-of select="AILanguage"/> </AILanguage> </ItemAI> </xsl:for-each> <Locations> <CountryOfOriginCode> <xsl:value-of select="Locations/CountryOfOriginCode"/> </CountryOfOriginCode> <xsl:for-each select="Locations/ItemCountryonRouteCode"> <ItemCountryonRouteCode> <xsl:value-of select="."/> </ItemCountryonRouteCode> </xsl:for-each> <ItemDispatchCountry> <xsl:value-of select="Locations/ItemDispatchCountry"/> </ItemDispatchCountry> <ItemDestinationCountry> <xsl:value-of select="Locations/ItemDestinationCountry"/> </ItemDestinationCountry> </Locations> <Measurements> <GrossMass> <xsl:value-of select="Measurements/GrossMass"/> </GrossMass> <NetMass> <xsl:value-of select="Measurements/NetMass"/> </NetMass> <SupplementaryUnits> <xsl:value-of select="Measurements/SupplementaryUnits"/> </SupplementaryUnits> <ThirdQuantity> <xsl:value-of select="Measurements/ThirdQuantity"/> </ThirdQuantity> </Measurements> <xsl:for-each select="Package"> <Package> <PackageNumber> <xsl:value-of select="PackageNumber"/> </PackageNumber> <PackageKind> <xsl:value-of select="PackageKind"/> </PackageKind> <PackageMarks> <xsl:value-of select="PackageMarks"/> </PackageMarks> <PackageLanguage> <xsl:value-of select="PackageLanguage"/> </PackageLanguage> </Package> </xsl:for-each> <PriceValue> <ItemStatisticalValue> <xsl:value-of select="PriceValue/ItemStatisticalValue"/> </ItemStatisticalValue> <ItemPrice> <xsl:value-of select="PriceValue/ItemPrice"/> </ItemPrice> </PriceValue> <ItemReferences> <xsl:for-each select="ItemReferences/ContainerID"> <ContainerID> <xsl:value-of select="."/> </ContainerID> </xsl:for-each> <QuotaNo> <xsl:value-of select="ItemReferences/QuotaNo"/> </QuotaNo> <UNDangerousGoodsCode> <xsl:value-of select="ItemReferences/UNDangerousGoodsCode"/> </UNDangerousGoodsCode> </ItemReferences> <GoodsDescription> <GoodsDescription> <xsl:value-of select="GoodsDescription/GoodsDescription"/> </GoodsDescription> <GoodsDescriptionLanguage> <xsl:value-of select="GoodsDescription/GoodsDescriptionLanguage"/> </GoodsDescriptionLanguage> </GoodsDescription> <Documents> <xsl:for-each select="Documents/PreviousDocument"> <PreviousDocument> <PreviousDocumentKind> <xsl:value-of select="PreviousDocumentKind"/> </PreviousDocumentKind> <PreviousDocumentIdentifier> <xsl:value-of select="PreviousDocumentIdentifier"/> </PreviousDocumentIdentifier> <PreviousDocumentType> <xsl:value-of select="PreviousDocumentType"/> </PreviousDocumentType> <PreviousDocumentLanguage> <xsl:value-of select="PreviousDocumentLanguage"/> </PreviousDocumentLanguage> </PreviousDocument> </xsl:for-each> <xsl:for-each select="Documents/ItemDocument"> <ItemDocument> <DocumentCode> <xsl:value-of select="DocumentCode"/> </DocumentCode> <DocumentPart> <xsl:value-of select="DocumentPart"/> </DocumentPart> <DocumentQuantity> <xsl:value-of select="DocumentQuantity"/> </DocumentQuantity> <DocumentReason> <xsl:value-of select="DocumentReason"/> </DocumentReason> <DocumentReference> <xsl:value-of select="DocumentReference"/> </DocumentReference> <DocumentStatus> <xsl:value-of select="DocumentStatus"/> </DocumentStatus> <DocumentLanguage> <xsl:value-of select="DocumentLanguage"/> </DocumentLanguage> </ItemDocument> </xsl:for-each> </Documents> <Valuation> <ValuationMethodCode> <xsl:value-of select="Valuation/ValuationMethodCode"/> </ValuationMethodCode> <ItemValuationAdjustmentCode> <xsl:value-of select="Valuation/ItemValuationAdjustmentCode"/> </ItemValuationAdjustmentCode> <ItemValuationAdjustmentPercentage> <xsl:value-of select="Valuation/ItemValuationAdjustmentPercentage"/> </ItemValuationAdjustmentPercentage> </Valuation> <ItemTransportChargeMOP> <xsl:value-of select="ItemTransportChargeMOP"/> </ItemTransportChargeMOP> <xsl:for-each select="ItemProcessingInstructions"> <ItemProcessingInstructions> <xsl:value-of select="."/> </ItemProcessingInstructions> </xsl:for-each> </Items> </xsl:for-each> <NumberOfPackages> <xsl:value-of select="/Declaration/Header/NumberOfPackages"/> </NumberOfPackages> </Header> </Declaration> </xsl:template> </xsl:stylesheet> so for source xml <Declaration> <Message> <Meduim>#+#</Meduim> <MessageIdentifier>AA</MessageIdentifier> <CommonAccessReference></CommonAccessReference> </Message> <BeginingOfMessage> <MessageCode>ISD</MessageCode> <DeclarationCurrency></DeclarationCurrency> <MessageFunction>5</MessageFunction> </BeginingOfMessage> </Declaration> the final output is <Declaration> <Message> <Meduim></Meduim> <MessageIdentifier>AA</MessageIdentifier> </Message> <BeginingOfMessage> <MessageCode>ISD</MessageCode> <MessageFunction>5</MessageFunction> </BeginingOfMessage> </Declaration>

    Read the article

  • Should I strip the XML declaration from suds output before parsing with lxml?

    - by mikl
    I’m trying to implement a SOAP webservice in Python 2.6 using the suds library. That is working well, but I’ve run into a problem when trying to parse the output with lxml. Suds returns a suds.sax.text.Text object with the reply from the SOAP service. The suds.sax.text.Text class is a subclass of the Python built-in Unicode class. In essence, it would be comparable with this Python statement: u'<?xml version="1.0" encoding="utf-8" ?><root><lotsofelements \></root>' Which is incongrous, since if the XML declaration is correct, the contents are UTF-8 encoded, and thus not a Python Unicode object (because those are stored in some internal encoding like UCS4). lxml will refuse to parse this, as documented, since there is no clear answer to what encoding it should be interpreted as. As I see it, there are two ways out of this bind: Strip the <?xml> declaration, including the encoding. Convert the output from Suds into a bytestring, using the specified encoding. Currently, the data I’m receiving from the webservice is within the ASCII-range, so either way will work, but both feels very much like ugly hacks to me, and I’m not quite sure what would happen, if I start to receive data that would need a wider range of Unicode characters. Any good ideas? I can’t imagine I’m the first one in this position…

    Read the article

  • c# - How do you get a variable's name as it was physically typed in its declaration?

    - by Petras
    The class below contains the field city. I need to dynamically determine the field's name as it is typed in the class declaration i.e. I need to get the string "city" from an instance of the object city. I have tried to do this by examining its Type in DoSomething() but can't find it when examining the contents of the Type in the debugger. Is it possible? public class Person { public string city = "New York"; public Person() { } public void DoSomething() { Type t = city.GetType(); string field_name = t.SomeUnkownFunction(); //would return the string "city" if it existed! } } Some people in their answers below have asked me why I want to do this. Here's why. In my real world situation, there is a custom attribute above city. [MyCustomAttribute("param1", "param2", etc)] public string city = "New York"; I need this attribute in other code. To get the attribute, I use reflection. And in the reflection code I need to type the string "city" MyCustomAttribute attr; Type t = typeof(Person); foreach (FieldInfo field in t.GetFields()) { if (field.Name == "city") { //do stuff when we find the field that has the attribute we need } } Now this isn't type safe. If I changed the variable "city" to "workCity" in my field declaration in Person this line would fail unless I knew to update the string if (field.Name == "workCity") //I have to make this change in another file for this to still work, yuk! { } So I am trying to find some way to pass the string to this code without physically typing it. Yes, I could declare it as a string constant in Person (or something like that) but that would still be typing it twice. Phew! That was tough to explain!! Thanks Thanks to all who answered this * a lot*. It sent me on a new path to better understand lambda expressions. And it created a new question.

    Read the article

  • Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk

    - by Tim Huffam
    This error occurred on our TFS2008 build server which we had upgraded to cater for VS2010 projects (by installing VS2010 on the build server - see this article). Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. However - although we had installed VS2010 on the build server - we had not installed the web development components (Visual Web Developer) - this is what caused the error. To fix - simply add the web development components: Go into Control Panel - Add or Remove Programs Select Microsoft Visual Studio 2010, and click on Change/Remove In the VS Maintenance Mode screens, select Add or Remove Features In the Setup - Options page make sure 'Visual Web Developer' is checked. Click on Update.   You shouldn't need to restart your build service. HTH Tim

    Read the article

  • The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on di

    - by simonsabin
    Are you trying to build a SQL Server database project and getting   The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. We had this recently when trying to build one SSDT solution but not when building another.   Checking the build agent the error was correct that file didn’t exist...(read more)

    Read the article

  • Can getters and setters be inlined when definition and declaration are seperated in .h and .cpp files?

    - by Nathan
    I have searched and have been unable to verify how the GCC compiler will handle inlining getters and setters when declaration is in .h file and definition is in .cpp file. Most seem to say that GCC can't see across these source file barriers and won't be able to inline these at all, while others disagree. I have looked at the documentation and I can't find the answer there either. Did I miss it? I do realize that inlining is a choice made by the compiler and is not always guaranteed, but assuming optimal situations, is it at least possible?

    Read the article

  • How to get the Doctype Declaration in Xerces-C when using SAX2 ?

    - by ArtB
    I am using SAX2 from Xerces-C to read an XML document. However, I would like to check the Doctype declaration (if there is any) to make sure that the XML file is in the format I am expecting. I have tried the unparsedEntityDecl and notationDecl methods from the DTDHandler, and EntityResolver seems to be more low-level than what I am looking for. My motivation is for this is to be able to confirm that the input is of the format I am expecting so that I can differentiate between documents which produce no output and those that are entirely of the wrong format.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >