Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: JohnW@Wessex

Page 1 of 80 1 2 3 4

Search: Search took 0.09 seconds.

  1. Re: how overloading char* and string operators?

    I copy and pasted your code directly to a VS2013 project.
    It compiles with no errors.
  2. Re: how overloading char* and string operators?

    You don't need to cast it to a std::string. It has an inplicit constructor for char*.



    class Test
    {
    public:

    Test()
    : result("Hello world")
  3. Re: how overloading char* and string operators?

    See the edited post.

    "One option is to remove the std::string conversion operator and let the string be constructed from the char*."
  4. Re: how overloading char* and string operators?

    The problem is that a std::string can be created from both a std::string and a char*.

    When the compiler sees the line 'c=b;' it cannot determine which conversion operator it should use.
    Both are...
  5. Replies
    7
    Views
    583

    Re: algorithm in C++ help

    You may find this post on Stackoverflow useful.
    http://stackoverflow.com/a/1617797
  6. Replies
    2
    Views
    336

    Re: const_reverse_iterator

    Indeed, but I was trying to post the least amount of code that replicated the problem.
  7. Replies
    2
    Views
    336

    const_reverse_iterator

    I've been creating a custom container and ran into this problem that has had me flumoxed all day.
    I'm sure I'm missing something obvious, but I just can't seem to see it.

    The code below fails...
  8. Replies
    6
    Views
    587

    Re: [RESOLVED] Broken Visual studio

    I don't really know. I assume one of the include file got corrupted in some way.
    A normal re-installation didn't seem to overwrite all of the files.
    I uninstalled VS, manually erased the folders,...
  9. Replies
    6
    Views
    587

    Re: Broken Visual studio

    OK, that worked.
  10. Replies
    6
    Views
    587

    Re: Broken Visual studio

    Not that I'm aware of. I imagine something got corrupted, but I hoped a re-install would fix it.

    I'm going to try to eradicate all traces of VS2008 from my PC and do another re-install.
  11. Replies
    6
    Views
    587

    [RESOLVED] Broken Visual studio

    For some reason, my Visual Studio 2008 Express has started to throw compile errors when including <iostream>

    All projects that previously compiled without errors are now failing.

    In fact I can...
  12. Replies
    11
    Views
    834

    Re: Static & Template sanity check.

    I ended up using Superbonzo's technique.
  13. Replies
    11
    Views
    834

    Re: Static & Template sanity check.

    As I've just discovered, this technique does not compile if any of the template parameters have copy constructors.

    On Visual Studio this gives error C2621
  14. Re: I have 7 days to prepare for an Embedded C++ Interview. Any tips and good links?

    I got the usual FUD aurguments from them such as 'code bloat', 'slow' and 'inefficient'.
    I tried to point out that, if they were experienced C coders, they were undoubtedly manually implementing...
  15. Re: Structured Data: Nesting Triangles(using structs and doing some geometric calcula

    Some of the information here should give you an idea.

    http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=geometry1...
  16. Re: I have 7 days to prepare for an Embedded C++ Interview. Any tips and good links?

    I tried talking up the suitability of C++ in an embedded environment to a group of hardware engineers (who'd never programmed in anything but C) at an interview once. It didn't go down too well.
  17. Replies
    11
    Views
    834

    Re: Static & Template sanity check.

    Thanks :thumb:
    I haven't delved much into TMP yet (It tends to give me a headache quite quickly) but I'll squirrel that information away for future reference.
  18. Replies
    11
    Views
    834

    Re: Static & Template sanity check.

    I work with embedded projects and, unfortunately, the compilers aren't likely to have C++11 support for a while yet. :sick:
  19. Re: I have 7 days to prepare for an Embedded C++ Interview. Any tips and good links?

    Search the web for opinions about what parts of C++ to be aware of when programming in an embedded envioronment.
    Opinions can differ quite a lot concerning C++ constructs, but RTTI, dynamic memory...
  20. Replies
    11
    Views
    834

    Re: Static & Template sanity check.

    Yes that would be simpler.
    The technique I used was from a more generic solution for templates with variable numbers of type parameters.
  21. Replies
    11
    Views
    834

    Re: Static & Template sanity check.

    That's what I thought, but I just got a bit paranoid about missing some dark corner case.
  22. Replies
    11
    Views
    834

    Static & Template sanity check.

    Can people just do a quick sanity check of this concept?
    I'm playing around with a technique to parameterise a template with the largest 'sizeof'
    result for a set of classes.

    A, B, C & D are...
  23. Re: Problem With Exception Specifications

    Herb Sutter has written about exception specifications here.

    His conclusions were...

    Moral #1: Never write an exception specification.

    Moral #2: Except possibly an empty one, but if I were...
  24. Replies
    3
    Views
    199

    Re: operator overloading issues!

    You may find this useful.

    http://en.wikibooks.org/wiki/C%2B%2B_Programming/Operators/Operator_Overloading#Memory_management_operators
  25. Replies
    6
    Views
    611

    Re: Violating C++ Standard?

    Also be aware that sometimes compilers will initialise variables when in 'debug mode' but leave them untouched when in 'release mode'.
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center