Search Results

Search found 1644 results on 66 pages for 'cpp fanatic'.

Page 18/66 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Can't open display: :0

    - by empec
    I'm trying to get Nexus Mod Manager (Beta yet) working on wine, but after the configuration of NMM it crashes with an error. During the startup it spams alot of terminal stuff and at the end I find this error. ###!!! ABORT: Main-thread-only object used off the main thread: file /build/wine-mozilla-1.8/xpcom/base/nsCycleCollector.cpp, line 1166 ###!!! ABORT: Main-thread-only object used off the main thread: file /build/wine-mozilla-1.8/xpcom/base/nsCycleCollector.cpp, line 1166 Maximum number of clients reachederr:winediag:x11drv_init_thread_data x11drv: Can't open display: :0. Please ensure that your X server is running and that $DISPLAY is set correctly. Any suggestions? Thanks!

    Read the article

  • C++: Declaration of template class member specialization

    - by Ziv
    When I specialize a (static) member function/constant in a template class, I'm confused as to where the declaration is meant to go. Here's an example of what I what to do - yoinked directly from IBM's reference on template specialization: ===IBM Member Specialization Example=== template<class T> class X { public: static T v; static void f(T); }; template<class T> T X<T>::v = 0; template<class T> void X<T>::f(T arg) { v = arg; } template<> char* X<char*>::v = "Hello"; template<> void X<float>::f(float arg) { v = arg * 2; } int main() { X<char*> a, b; X<float> c; c.f(10); // X<float>::v now set to 20 } The question is, how do I divide this into header/cpp files? The generic implementation is obviously in the header, but what about the specialization? It can't go in the header file, because it's concrete, leading to multiple definition. But if it goes into the .cpp file, is code which calls X::f() aware of the specialization, or might it rely on the generic X::f()? So far I've got the specialization in the .cpp only, with no declaration in the header. I'm not having trouble compiling or even running my code (on gcc, don't remember the version at the moment), and it behaves as expected - recognizing the specialization. But A) I'm not sure this is correct, and I'd like to know what is, and B) my Doxygen documentation comes out wonky and very misleading (more on that in a moment a later question). What seems most natural to me would be something like this, declaring the specialization in the header and defining it in the .cpp: ===XClass.hpp=== #ifndef XCLASS_HPP #define XCLASS_HPP template<class T> class X { public: static T v; static void f(T); }; template<class T> T X<T>::v = 0; template<class T> void X<T>::f(T arg) { v = arg; } /* declaration of specialized functions */ template<> char* X<char*>::v; template<> void X<float>::f(float arg); #endif ===XClass.cpp=== #include <XClass.hpp> /* concrete implementation of specialized functions */ template<> char* X<char*>::v = "Hello"; template<> void X<float>::f(float arg) { v = arg * 2; } ...but I have no idea if this is correct. Any ideas? Thanks much, Ziv

    Read the article

  • Please Help i keep getting a no match for call to error!!??

    - by Timothy Poseley
    #include <iostream> #include <string> using namespace std; // Turns a digit between 1 and 9 into its english name // Turn a number into its english name string int_name(int n) { string digit_name; { if (n == 1) return "one"; else if (n == 2) return "two"; else if (n == 3) return "three"; else if (n == 4) return "four"; else if (n == 5) return "five"; else if (n == 6) return "six"; else if (n == 7) return "seven"; else if (n == 8) return "eight"; else if (n == 9) return "nine"; return ""; } string teen_name; { if (n == 10) return "ten"; else if (n == 11) return "eleven"; else if (n == 12) return "twelve"; else if (n == 13) return "thirteen"; else if (n == 14) return "fourteen"; else if (n == 14) return "fourteen"; else if (n == 15) return "fifteen"; else if (n == 16) return "sixteen"; else if (n == 17) return "seventeen"; else if (n == 18) return "eighteen"; else if (n == 19) return "nineteen"; return ""; } string tens_name; { if (n == 2) return "twenty"; else if (n == 3) return "thirty"; else if (n == 4) return "forty"; else if (n == 5) return "fifty"; else if (n == 6) return "sixty"; else if (n == 7) return "seventy"; else if (n == 8) return "eighty"; else if (n == 9) return "ninety"; return ""; } int c = n; // the part that still needs to be converted string r; // the return value if (c >= 1000) { r = int_name(c / 1000) + " thousand"; c = c % 1000; } if (c >= 100) { r = r + " " + digit_name(c / 100) + " hundred"; c = c % 100; } if (c >= 20) { r = r + " " + tens_name(c /10); c = c % 10; } if (c >= 10) { r = r + " " + teen_name(c); c = 0; } if (c > 0) r = r + " " + digit_name(c); return r; } int main() { int n; cout << endl << endl; cout << "Please enter a positive integer: "; cin >> n; cout << endl; cout << int_name(n); cout << endl << endl; return 0; } I Keep getting this Error code: intname2.cpp: In function âstd::string int_name(int)â: intname2.cpp:74: error: no match for call to â(std::string) (int)â intname2.cpp:80: error: no match for call to â(std::string) (int)â intname2.cpp:86: error: no match for call to â(std::string) (int&)â intname2.cpp:91: error: no match for call to â(std::string) (int&)â

    Read the article

  • I keep getting a no match for call to error!!??

    - by Timothy Poseley
    #include <iostream> #include <string> using namespace std; // Turns a digit between 1 and 9 into its english name // Turn a number into its english name string int_name(int n) { string digit_name; { if (n == 1) return "one"; else if (n == 2) return "two"; else if (n == 3) return "three"; else if (n == 4) return "four"; else if (n == 5) return "five"; else if (n == 6) return "six"; else if (n == 7) return "seven"; else if (n == 8) return "eight"; else if (n == 9) return "nine"; return ""; } string teen_name; { if (n == 10) return "ten"; else if (n == 11) return "eleven"; else if (n == 12) return "twelve"; else if (n == 13) return "thirteen"; else if (n == 14) return "fourteen"; else if (n == 14) return "fourteen"; else if (n == 15) return "fifteen"; else if (n == 16) return "sixteen"; else if (n == 17) return "seventeen"; else if (n == 18) return "eighteen"; else if (n == 19) return "nineteen"; return ""; } string tens_name; { if (n == 2) return "twenty"; else if (n == 3) return "thirty"; else if (n == 4) return "forty"; else if (n == 5) return "fifty"; else if (n == 6) return "sixty"; else if (n == 7) return "seventy"; else if (n == 8) return "eighty"; else if (n == 9) return "ninety"; return ""; } int c = n; // the part that still needs to be converted string r; // the return value if (c >= 1000) { r = int_name(c / 1000) + " thousand"; c = c % 1000; } if (c >= 100) { r = r + " " + digit_name(c / 100) + " hundred"; c = c % 100; } if (c >= 20) { r = r + " " + tens_name(c /10); c = c % 10; } if (c >= 10) { r = r + " " + teen_name(c); c = 0; } if (c > 0) r = r + " " + digit_name(c); return r; } int main() { int n; cout << endl << endl; cout << "Please enter a positive integer: "; cin >> n; cout << endl; cout << int_name(n); cout << endl << endl; return 0; } I Keep getting this Error code: intname2.cpp: In function âstd::string int_name(int)â: intname2.cpp:74: error: no match for call to â(std::string) (int)â intname2.cpp:80: error: no match for call to â(std::string) (int)â intname2.cpp:86: error: no match for call to â(std::string) (int&)â intname2.cpp:91: error: no match for call to â(std::string) (int&)â

    Read the article

  • Debugging errors in c++

    - by user1513323
    I was working on a program that printed out the word count, character count and line count depending on the user's input. But I keep getting these error that are completely unknown to me. I was wondering if anyone could help. ** I've changed it from previous mistakes and am still receiving errors. Sorry I'm new to C++. The errors I got were filestat.cpp:47: error: ‘line’ was not declared in this scope filestat.cpp: In function ‘int wc(std::string)’: filestat.cpp:55: error: ‘line’ was not declared in this scope filestat.cpp: In function ‘int cc(std::string)’: filestat.cpp:67: error: ‘line’ was not declared in this scope #include<iostream> #include<fstream> #include<string> using namespace std; int lc(string fname); int wc(string fname); int cc(string fname); int main(){ string fname,line,command; ifstream ifs; int i; while(true){ cout<<"---- Enter a file name : "; if(getline(cin,line)){ if(line.length()== 4 && line.compare("exit")== 0){ cout<<"Exiting"; exit(0); }else{ string command = line.substr(0,2); fname= line.substr(4, line.length() -5); if( ifs.fail()){ ifs.open(fname.c_str()); cerr<< "File not found" <<fname <<endl; ifs.clear(); }else{ if(command.compare("lc")){ lc(fname); }else if (command.compare("wc")){ wc(fname); }else if(command.compare("cc")){ cc(fname); }else cout<<"Command unknown. "; } } } } return 0; } int lc(string fname){ int count; while(getline(fname, line)){ count++; } cout<<"Number of lines: "<<count ; } int wc(string fname){ int count; while(getline(fname, line)){ int pos=line.find_first_of("\n\t ",0); while(pos =! string::npos){ int length=line.length(); line = line.substr(pos+1, length - pos); count++; } } cout<< "Number of words: " <<count; } int cc(string fname){ int count; while(getline(fname, line)){ count = count + line.length(); } cout<< "Number of words: " <<count; }

    Read the article

  • Firefox Addons to go with Vimperator

    - by Weegee
    Being a ViM fanatic, I recently discovered and began using the Vimperator addon for Mozilla Firefox. I've really enjoyed using it so far, and there is even a list in the Vimperator wiki for some addons that work well with Vimperator. I'm curious as to what other addons that veteran Vimperator users would recommend? Does anyone have any good favorites that blend in well with Vimperator?

    Read the article

  • Ubuntu Newbie Needs Assistance!!

    - by Steve Greene
    New Ubuntu User Needs Help!- version 9.10 does not communicate with laptop Hello folks, Several days ago, I installed Ubuntu 9.10 onto my Acer Aspire 3100 laptop, running it alongside Widows Vista as a dual-bootable system. Creation of the Ubuntu boot CD went fine, and the installation onto my hard drive was flawless. Ubuntu opens and behaves as I would expect, except for one little problem. For reasons unknown to me, Ubuntu is not communicating with my laptop's networking hardware, and I have no internet connectivity, even when sitting directly under the wireless router at the local library (literally), which puts out a wickedly-fast signal that my Windows Vista OS auto-detects and immediately connects to. Up in the right side of the Ubuntu desktop, I click on the network icon and it does not show a wireless connection at all, even though I am only a few feet from the router. At home, where I use a dialup modem, I also see no means of getting online. My modem is an HDAUDIO Soft Data Fax Modem with Smart CP,manufactured by CXT (Conexant Systems Inc., file version 4.0.13.0, and the driver version is 7.58.0.0). I desparately wish to convert to Ubuntu. I used Mac for ten years, and then Windows for ten years. Now, after 20 years, I want to live out my days as an open-source Ubuntu fanatic. I am ready to give the old status quo the boot! I am an advanced computer user, but I am not a programmer. I seek a solution that is user-friendly for normal people, something equivalent to a driver that I can easily install or activate that will allow Ubuntu to see my hardware and get me connected. Can anyone help me over this hopefully-little glitch so that I can move on in total Ubuntu bliss? My processor is a Mobile AMD Sempron Processor 3500+ at 1.80 GHz, 1.50 GB RAM, and a 32-bit Operating System. I am running Windows Vista Home Basic, Service Pack 2. My current email is [email protected] if you have a workable solution that does not require programmer status to implement. Surely this must be a simple fix that I simply am overlooking, but being the new guy on the block, I have yet to be enlightened. Thanks for your help in coming up to speed!! Steve Wanna' be Ubuntu Fanatic "If you're not living on the edge, you're taking up too much space."

    Read the article

  • fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_43.lib'

    - by Poni
    Made a new project, added main.cpp and wrote the code at this URL: http://www.boost.org/doc/libs/1_43_0/doc/html/boost_asio/example/echo/async_tcp_echo_server.cpp Also, added the appropriate include path. What's next?!?!! It seems like a darn mystery to build a boost code! Been digging on it for more than 10 hours. Can anyone give a straightforward answer on how to build the boost library from the code under windows, VC9? God bless you all.

    Read the article

  • Bluetooth connect to a RS232 adapter in android

    - by ThePosey
    Hello All, I am trying to use the Bluetooth Chat sample API app that google provides to connect to a bluetooth RS232 adapter hooked up to another device. Here is the app for reference: http://developer.android.com/resources/samples/BluetoothChat/index.html And here is the spec sheet for the RS232 connector just for reference: http://serialio.com/download/Docs/BlueSnap-guide-4.77%5FCommands.pdf Well the problem is that when I go to connect to the device with: mmSocket.connect(); (BluetoothSocket::connect()) I always get an IOException error thrown by the connect method. When I do a toString on the exception I get "Service discovery failed". My question is mostly what are the cases that would cause an IOException to get thrown in the connect method? I know those are in the source somewhere but I don't know exactly how the java layer that you write apps in and the C/C++ layer that contains the actual stacks interface. I know that it uses the bluez bluetooth stack which is written in C/C++ but not sure how that ties into the java layer which is what I would think is throwing the exception. Any help on pointing me to where I can try to dissect this issue would be incredible. Also just to note I am able to pair with the RS232 adapter just fine but I am never able to actually connect. Here is the logcat output for more reference: I/ActivityManager( 1018): Displayed activity com.example.android.BluetoothChat/.DeviceListActivity: 326 ms (total 326 ms) E/BluetoothService.cpp( 1018): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) D/BluetoothChat( 1729): onActivityResult -1 D/BluetoothChatService( 1729): connect to: 00:06:66:03:0C:51 D/BluetoothChatService( 1729): setState() STATE_LISTEN - STATE_CONNECTING E/BluetoothChat( 1729): + ON RESUME + I/BluetoothChat( 1729): MESSAGE_STATE_CHANGE: STATE_CONNECTING I/BluetoothChatService( 1729): BEGIN mConnectThread E/BluetoothService.cpp( 1018): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) E/BluetoothEventLoop.cpp( 1018): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/1498/hci0/dev_00_06_66_03_0C_51 I/BluetoothChatService( 1729): CONNECTION FAIL TOSTRING: java.io.IOException: Service discovery failed D/BluetoothChatService( 1729): setState() STATE_CONNECTING - STATE_LISTEN D/BluetoothChatService( 1729): start D/BluetoothChatService( 1729): setState() STATE_LISTEN - STATE_LISTEN I/BluetoothChat( 1729): MESSAGE_STATE_CHANGE: STATE_LISTEN V/BluetoothEventRedirector( 1080): Received android.bleutooth.device.action.UUID I/NotificationService( 1018): enqueueToast pkg=com.example.android.BluetoothChat callback=android.app.ITransientNotification$Stub$Proxy@446327c8 duration=0 I/BluetoothChat( 1729): MESSAGE_STATE_CHANGE: STATE_LISTEN E/BluetoothEventLoop.cpp( 1018): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/1498/hci0/dev_00_06_66_03_0C_51 V/BluetoothEventRedirector( 1080): Received android.bleutooth.device.action.UUID The device I'm trying to connect to is the 00:06:66:03:0C:51 which I can scan for and apparently pair with just fine.

    Read the article

  • Basic C++ Header File Question

    - by Vsh3r
    Hi, I have a project with two header files mainwindow.h and website.h. I want to access a method from website.cpp from inside mainwindow.cpp. I can access any function from inside mainwindow by doing Window w then doing w-function(); However, when the function finishes from inside the mainwindow the memory for w is erased. How do I keep w around and HOW DO I DECLARE Website w from my header file? Thanks, V$h3r

    Read the article

  • precompiled header .pch files are machine sensitive?

    - by fresky
    Hi, experts, I tried to reuse the .pch to speed the build using the following way: use /Yc on stdafx.cpp to create the .pch files to a folder exclude stdafx.cpp in the project, and modify the link option It success in my machine, but failed in another, got the error message: error C2011: '*' : 'struct' type redefinition So first I want to ask whether the .pch files are machine sensitive? then secondly, the above approaches workable? Thanks!

    Read the article

  • perl regex escape characters

    - by freshWoWer
    I have heard perl is a good language at doing regex but i am a bit confused at the characters that requires escaping I tested the code on http://regexlib.com/RETester.aspx and got the result I want //home/dev/abc/code/hello/world.cpp#1 //home/dev/((.*?)/[^/]+).*# Match $1 $2 //home/dev/abc/code/hello/world.cpp# abc/code abc However, I am not quite sure how do i translate this to perl code I tried, \/\/home\/dev\/\(\(\.\*\?\)\/\[\^\/\]\+\)\.\*\# and \/\/home\/dev\/((.*?)\/[^\/]+).*\# and both failed Don't you think the escaping makes the regex very unreadable? Am i using something wrong?

    Read the article

  • What does this C++ compilation error mean?

    - by devlife
    Does anyone have any clue as to what this might mean? (ClCompile target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Win32\Microsoft.Cpp.Win32.Targets(147,5): error MSB6006: "CL.exe" exited with code -1073741515. It builds fine on my dev box but fails due to this error on our CI box. It's running on .NET 3.5. Any help would be MUCH appreciated.

    Read the article

  • Specify additional files to clean when doing a "make clean" with autoconf

    - by vy32
    I am using autoconf. Right now I have an intermediate .cpp file that is generated. I want to have the .cpp file deleted when I do a "make clean". I tried specifying the file in a CONFIG_CLEAN_FILES variable, but that only takes effect when I do a make distlclean. Is there a variable to set to delete the file when I do a make clean? If not, how do I do it? Thanks

    Read the article

  • What are the differences between GIT and SVN when it comes to merge conflicts solving.

    - by chalup
    I keep hearing that branching in git is so much easier than in SVN, because it's easier to merge the branch back to trunk/master. I've read some tutorials, but they only covered basic merge conflicts ("Alice changed line 8 of code.cpp and at the same time Bob changed line 8 of code.cpp...") and there are no differences between SVN and all other distributed source control systems. Can you give me the examples of changes in branch that would cause troubles in SVN repository, but would be handled gracefully by git?

    Read the article

  • How to deal with Warning C4100 in Visual Studio 2008

    - by Jimmie
    For some reason my Visual Studio 2008 began to show warnings for code like: "int main( int argc, char **argv)", which is really annoying. The detailed warning ouputs are (you can ignore the line numbers): 1.\main.cpp(86) : warning C4100: 'argv' : unreferenced formal parameter 1.\main.cpp(86) : warning C4100: 'argc' : unreferenced formal parameter I wonder if there are settings in Visual Studio 2008 that have been accidentally changed. Or how should I deal with this warning? Thank you all.

    Read the article

  • Compiler error: memset was not declared in this scope

    - by michael
    Hi, I am trying to compile my c program in ubuntu 9.10 (gcc 4.4.1). I am getting this error: Rect.cpp:344: error: ‘memset’ was not declared in this scope But the problem is I have already included in my cpp file: #include <stdio.h> #include <stdlib.h> And the same program compiles fine under ubuntu 8.04 gcc 4.2.4). Please tell me what am i missing. Thank you.

    Read the article

  • Problem with std::map and std::pair

    - by Tom
    Hi everyone. I have a small program I want to execute to test something #include <map> #include <iostream> using namespace std; struct _pos{ float xi; float xf; bool operator<(_pos& other){ return this->xi < other.xi; } }; struct _val{ float f; }; int main() { map<_pos,_val> m; struct _pos k1 = {0,10}; struct _pos k2 = {10,15}; struct _val v1 = {5.5}; struct _val v2 = {12.3}; m.insert(std::pair<_pos,_val>(k1,v1)); m.insert(std::pair<_pos,_val>(k2,v2)); return 0; } The problem is that when I try to compile it, I get the following error $ g++ m2.cpp -o mtest In file included from /usr/include/c++/4.4/bits/stl_tree.h:64, from /usr/include/c++/4.4/map:60, from m2.cpp:1: /usr/include/c++/4.4/bits/stl_function.h: In member function ‘bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = _pos]’: /usr/include/c++/4.4/bits/stl_tree.h:1170: instantiated from ‘std::pair<typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(const _Val&) [with _Key = _pos, _Val = std::pair<const _pos, _val>, _KeyOfValue = std::_Select1st<std::pair<const _pos, _val> >, _Compare = std::less<_pos>, _Alloc = std::allocator<std::pair<const _pos, _val> >]’ /usr/include/c++/4.4/bits/stl_map.h:500: instantiated from ‘std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename _Alloc::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const std::pair<const _Key, _Tp>&) [with _Key = _pos, _Tp = _val, _Compare = std::less<_pos>, _Alloc = std::allocator<std::pair<const _pos, _val> >]’ m2.cpp:30: instantiated from here /usr/include/c++/4.4/bits/stl_function.h:230: error: no match for ‘operator<’ in ‘__x < __y’ m2.cpp:9: note: candidates are: bool _pos::operator<(_pos&) $ I thought that declaring the operator< on the key would solve the problem, but its still there. What could be wrong? Thanks in advance.

    Read the article

  • Problem with include guard

    - by isurulucky
    When I add an include guard to my header file for a Visual C++ project, it gives me the following warning and error: warning C4603: '_MAPTEST_H' : macro is not defined or definition is different after precompiled header use Add macro to precompiled header instead of defining here .\MapTest.cpp(6) : use of precompiled header** // the precompiled header stdafx.h is included in this line .\MapTest.cpp(186) : fatal error C1020: unexpected #endif but when I add the precompiled header before the include guard, no warning or error is emitted. What is the reason for this?

    Read the article

  • conflicting declaration when filling a static std::map class member variable

    - by Max
    I have a class with a static std::map member variable that maps chars to a custom type Terrain. I'm attempting to fill this map in the class's implementation file, but I get several errors. Here's my header file: #ifndef LEVEL_HPP #define LEVEL_HPP #include <bitset> #include <list> #include <map> #include <string> #include <vector> #include "libtcod.hpp" namespace yarl { namespace level { class Terrain { // Member Variables private: std::bitset<5> flags; // Member Functions public: explicit Terrain(const std::string& flg) : flags(flg) {} (...) }; class Level { private: static std::map<char, Terrain> terrainTypes; (...) }; } } #endif and here's my implementation file: #include <bitset> #include <list> #include <map> #include <string> #include <vector> #include "Level.hpp" #include "libtcod.hpp" using namespace std; namespace yarl { namespace level { /* fill Level::terrainTypes */ map<char,Terrain> Level::terrainTypes['.'] = Terrain("00001"); // clear map<char,Terrain> Level::terrainTypes[','] = Terrain("00001"); // clear map<char,Terrain> Level::terrainTypes['\''] = Terrain("00001"); // clear map<char,Terrain> Level::terrainTypes['`'] = Terrain("00001"); // clear map<char,Terrain> Level::terrainTypes[178] = Terrain("11111"); // wall (...) } } I'm using g++, and the errors I get are src/Level.cpp:15: error: conflicting declaration ‘std::map, std::allocator yarl::level::Level::terrainTypes [46]’ src/Level.hpp:104: error: ‘yarl::level::Level::terrainTypes’ has a previous declaration as ‘std::map, std::allocator yarl::level::Level::terrainTypes’ src/Level.cpp:15: error: declaration of ‘std::map, std::allocator yarl::level::Level::terrainTypes’ outside of class is not definition src/Level.cpp:15: error: conversion from ‘yarl::level::Terrain’ to non-scalar type ‘std::map, std::allocator ’ requested src/Level.cpp:15: error: ‘yarl::level::Level::terrainTypes’ cannot be initialized by a non-constant expression when being declared I get a set of these for each map assignment line in the implementation file. Anyone see what I'm doing wrong? Thanks for your help.

    Read the article

  • Blank source file. How can I decompile the .exe? [closed]

    - by Jiexi
    Right after I finished my project for my Computer Science class, I hit save and the computer froze. When i came back, the cpp file wouldn't open through visual studio, I have the exe and object files. Please tell me I can get my source code back :( EDIT: the .cpp file is blank, and i wasn't prompted for recovery when starting visual studio again. I already checked /documents/visualstudio/backup, nothing is there.

    Read the article

  • how to get path froma variable

    - by yoshco
    following http://stackoverflow.com/questions/659647/how-to-get-folder-path-from-file-path-with-cmd i want to strip the path (without the filename) from a variable. following the logic of the methods discussed above i would like to use batch bellow, which doesnt work. any takers? possible? set cpp="C:\temp\lib.dll" echo %cpp% "C:\temp\lib.dll" echo %~dpcpp "C:\temp\" > doesn't work

    Read the article

  • templates and casting operators

    - by Jonathan Swinney
    This code compiles in CodeGear 2009 and Visual Studio 2010 but not gcc. Why? class Foo { public: operator int() const; template <typename T> T get() const { return this->operator T(); } }; Foo::operator int() const { return 5; } The error message is: test.cpp: In member function `T Foo::get() const': test.cpp:6: error: 'const class Foo' has no member named 'operator T'

    Read the article

  • How can I make this Perl regex work?

    - by Geo
    I have this line ( it's a single line, SO makes it seem like 2 ): /Od /D "WIN32" /D "_DEBUG" /FD /EHa /MDd /Fo"Debug" /Fd"Debug\vc80.pdb" /W3 /c /Zi /clr /TP .\main.cpp" And I want to extract the .\main.cpp. I thought the following would do the trick: if($string =~ /.*\s+(.*)$/i) { print "matched ",$1,"\n"; } because this same regex works in Ruby, and extracts the string I required. How can I get it working?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >