Search Results - VBForums

Search:

Type: Posts; User: AceInfinity

Page 1 of 13 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    3
    Views
    4,271

    Re: Using constuctor in class or vector

    http://en.cppreference.com/w/cpp/language/range-for

    Just change it back to an iterator for loop then.

    Define the iterator, move it to the next position while it's != vector end(). That code is...
  2. Replies
    3
    Views
    4,271

    Re: Using constuctor in class or vector

    What is the goal here exactly? This is improper code to begin with... :S

    A vector of type B doesn't mean that they are initialized right away, you need to do this manually to populate the...
  3. Re: How to refer to class which was not yet declared?

    Just because the code compiled doesn't mean it is okay. From what I seen there was lots wrong with the structure of your application design. If you want to learn better ways of writing the...
  4. Re: How to Condence Font in StringBuilder

    You don't need to escape every '\' if you use verbatim strings:
    objSaleFileWrite.WriteLine(@"\si");
  5. Re: [RESOLVED] help with structure of vc++ dll

    What did your code look like? C++ uses & for reference parameters.
  6. Replies
    4
    Views
    592

    Re: Check if a process is open?

    No, because that would eliminate all possibility of you actually taking the time to figure it out and learn something. Read the documentation and see which handles are passed to what functions, and...
  7. Replies
    4
    Views
    592

    Re: Check if a process is open?

    Enumerate the processes with CreateToolhelp32Snapshot(), Process32Next() / Process32First() until you find the process that you're looking for then call TerminateProcess()... It's not that difficult.
  8. VS 2010 Re: Calculating large numbers using mod function

    You should have read earlier posts first. He wrote the explanation for that here:
  9. Replies
    3
    Views
    728

    Re: how create a control?

    Where is the message loop exactly? You need to first understand the event based model. There's tons wrong with this, although I can't help you with this based on my current understanding of your...
  10. Replies
    17
    Views
    674

    Re: computer aided drawing

    Actually I agree with boop boops here as well. Rectangles are not the basis of drawing efficiently anymore. Newer gaming engines are reluctant to use rectangles as a base drawing model because it has...
  11. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    These are still not user defined types... Imagine trying to convert a collection wrapper to a boolean? How would you do that? Or better yet, why? You don't know what this user defined type was meant...
  12. Replies
    18
    Views
    3,233

    VS 2010 Re: Draw a line in VB.NET (VS2012)

    dunfiddlin pointed out that the answer was given to you. If you don't see how to implement the solution, or you don't attempt to do it, how will you understand how to manage that solution even if...
  13. VS 2010 Re: Calculating large numbers using mod function

    No, i changes on this line:

    i /= 10 / 1;

    So after the initial:

    n = i;

    n is no longer equal to the value of i anymore. i = i / 10 / 1.
  14. Replies
    17
    Views
    674

    Re: computer aided drawing

    I've used AutoCAD before btw. It's quite an advanced program once you get into functions and all that good stuff. I'd taken a course and was a designer a while back. I haven't used much of it lately...
  15. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    There's a good reason this should never be attempted in the first place however. That is over the top, and would only make the efficiency of the language worse. If the user defined type is meant to...
  16. VS 2010 Re: Calculating large numbers using mod function

    i = 0
    For i = 0...

    Seems a bit redundant. Although for explicitly defining the array size, you can calculate the size of the number by doing this:
    Dim digits As Integer =...
  17. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    Huh?

    You'd better make sure that this works for the cases I've hinted at above. What do you mean by "share the mingw compiler with my new language"? I thought the intent was to create your...
  18. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    C++11 just means that you'll need to be able to compile with C++11 standards, if this is supposed to be distributed to others for use, and those people may not like to use C++11 yet, or they just...
  19. Replies
    18
    Views
    3,233

    VS 2010 Re: Draw a line in VB.NET (VS2012)

    This is because the OnPaint() method fires early on when the form is created, you can't control that, what you can do is set a boolean that is evaluated the next time the control is drawn however,...
  20. Replies
    17
    Views
    674

    Re: computer aided drawing

    I wrote a very simple Pong game simulation a while back: http://tech.reboot.pro/showthread.php?tid=3594

    http://i.imgur.com/2cBZa.gif

    Perhaps it'll give you some ideas. The graphics themselves...
  21. Re: [RESOLVED] SpecialFolder returning numerical value?

    The point here is that SpecialFolder is an enum, and JMC is pointing out that you're not reading the documentation to see why it's returning a numeric value, even though it should (because it's an...
  22. Re: Best Bitrate for High Quality Video Recording With ffmpeg.dll

    Try the HEVC (H.265) encoding and see what the output is. H.264 is still pretty good otherwise. The only thing is, I've been hearing high CPU usage from the HEVC format, even though it is supposedly...
  23. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    You need to read about how preprocessor directives like include work first to see why I've done it this way. All it does is allow the compiler to essentially replace that spot with the #include'd...
  24. Replies
    4
    Views
    806

    Re: Forcing HTML file to open in Excel

    Ahh, I didn't notice the methods being used, I just seen the regular IO stuff, and there was no mention that this was ASP.
  25. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    Consider the following template:

    MyVarType.h

    #ifndef __MyVarType_H__
    #define __MyVarType_H__

    #include <iostream>
    #include <string>
    #include <fstream>
  26. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    You're missing the point of include guards:

    // *** ADDED BY HEADER FIXUP ***
    #include <cstdlib>
    #include <iostream>
    #include <string>
    // *** END ***
    #ifndef VARIANT_H_INCLUDED
    #define...
  27. Replies
    14
    Views
    1,227

    Re: overloading char* and string operators

    Variant(bool val)
    {
    result=std::to_string(val);

    if (result=="0")
    {
    result="false";
    }
    else
    {
  28. Replies
    4
    Views
    806

    Re: Forcing HTML file to open in Excel

    @kfcSmitty: I wouldn't say impossible, if it does what he wants dragging the file into Excel. --> Command line arguments :confused:

    "C:\Program Files\Microsoft Office\Office15\EXCEL.EXE"...
  29. Re: how print a void pointer in string way?

    Doing so is much more complex than you think, which is suggestive by how you're demonstrating a conversion between types here. You have to provide the conversion yourself. What number did you use?...
  30. Re: how print a void pointer in string way?

    Why would you want a pointer to the string's underlying type? Or why would you do this in the first place? You're likely to receive a result that is not going to be null terminated at any 'proper'...
  31. Replies
    20
    Views
    894

    VS 2012 Re: [RESOLVED] Extract word between "

    The points in that article for the one I specifically linked to, still stand as far as naming conventions. There are errors on MSDN too, but by no means does that mean the entire site is bogus;...
  32. Replies
    10
    Views
    1,648

    Re: [RESOLVED] Prime Numbers

    The algorithm itself shows ~10 seconds for me. The problem above is with huge values for allocation and the new operator's limit for allocation within the program. I took a very basic and unmodified...
  33. Replies
    20
    Views
    894

    VS 2012 Re: [RESOLVED] Extract word between "

    To use it with a URL, all you have to do is pass the page source (as a string that contains the page HTML) to my function, along with the search string as "&quot;". Easiest way is to use the WebClient...
  34. Replies
    20
    Views
    894

    VS 2012 Re: Extract word between "

    Did you skip my example? :confused: I posted a function that basically did 99% of the work.
  35. Re: Beginning New Mini Project. Need to Separate Compiler Command Line Parameters

    Mine is configured via UCP to always start in source mode, not WYSIWYG. I find it easier to deal with especially when posting code.
  36. Replies
    2
    Views
    2,568

    Re: [C++]Rock-Paper-Scissors

    A few things:

    while (true == true)

    You would only need this, if you're doing it that way:

    while (true)

    Instead of evaluating strings, you should be evaluating a more simplistic and less...
  37. Replies
    2
    Views
    464

    Re: Computer player card game help.

    I don't think anybody is capable of providing an example when we don't know what this card game is about. You'll have to simulate AI, which can be easy to difficult depending on the game logic. In...
  38. Re: Reducing numbers to one digit (numerology related)

    In that case:
    Private Function DigitalRoot(s As String) As Integer
    Return DigitalRoot(s.ToUpper().Sum(Function(c) Asc(c) - Asc("@"c)))
    End Function

    Private Function DigitalRoot(n As Integer)...
  39. Re: Reducing numbers to one digit (numerology related)

    The naive way of doing it would be to cast the full numeric value to a string and parse from it adding each digit, and continuing the process until you're left with a single digit. I would use math...
  40. Replies
    10
    Views
    1,648

    Re: [RESOLVED] Prime Numbers

    Look into the Sieve of Atkin, it's an optimized implementation of Eratosthenes. Here is some example code I wrote in C++:
    // Generate primes using sieve of atkins with an arbitrary search limit...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.