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

Search:

Type: Posts; User: AlastrionaAdair

Page 1 of 4 1 2 3 4

Search: Search took 0.06 seconds.

  1. Replies
    12
    Views
    1,872

    Re: Command line input (odd problem)

    It had the exact same results, first read is skipped, later reads are successful.
  2. Replies
    12
    Views
    1,872

    Re: Command line input (odd problem)

    It's a pure command line application. And I still don't know the actual cause of the oddity. I don't understand why it doesn't work from the exception handler.
  3. Replies
    12
    Views
    1,872

    Re: Command line input (odd problem)

    Okay, the issue is probably the scope or context in which I am calling it. I am doing it from an exception handler. Basically there is an exception and I want to give the user the chance to type in...
  4. Replies
    12
    Views
    1,872

    Re: Command line input (odd problem)

    Same issue with all of them. Not to mention they require to read as char[] or byte[]. Not something I want to do.
  5. Replies
    12
    Views
    1,872

    Re: Command line input (odd problem)

    First line is empty. prints out line=<
    Second line prints it what its supposed t. ie: line=test<

    The problem is, it doesn't wait for input at the first readLine() call. It just immediatly goes to...
  6. Replies
    12
    Views
    1,872

    Command line input (odd problem)

    Okay I'm really confused right now. I'm probably missing something really obvious. I'm just trying to do some simple reading from the command line. (I'm using fedora 14, but I don't think OS matters...
  7. Replies
    3
    Views
    1,854

    Re: Java SizeOf /Instrumentation class

    If only we had such liberties in a business environment, then I would be using C++. I'm afraid use of Java is a requirement. I was kinda afraid of this response. I might have to just estimate the mem...
  8. Replies
    3
    Views
    1,854

    Java SizeOf /Instrumentation class

    Hello. I'm looking for a way in java to create a buffer with a fixed memory size. For example I want to create a buffer which can hold 10MB of objects in memory, then when the buffer is full, it will...
  9. Replies
    8
    Views
    842

    Re: Switch syntax

    The point of the enum is to make your switch more readable and not have a switch with seeminly random integers.



    Correct. A little oversight on my side. But if you replace my function with...
  10. Replies
    8
    Views
    842

    Re: Switch syntax

    EDIT: You'll need to calculate the actual value of the string and fill in the enum like that. I did CEST as an example.

    Wouldn't it work in combination with your idea of mapping the string to an...
  11. Replies
    8
    Views
    842

    Re: Switch syntax

    Enumarations?
  12. Replies
    3
    Views
    558

    Re: Where is the error :S

    Don't forget to add:

    using namespace std;
    if you use <iostream>.

    Also, what is your problem?
  13. Replies
    17
    Views
    1,571

    Re: How to pass an array to a function?

    Perhaps it's not completly correct. But I thought it would be easier for the OP to understand it this way. At least its not another off-topic post debating the definitition of pass-by-ref and...
  14. Replies
    17
    Views
    1,571

    Re: How to pass an array to a function?

    void foo(int* arr, int size)
    {
    for(int i=0;i<size);i++)
    cout<<arr[i]<<endl;
    }

    int main()
    {
    int a[] = {1,3,5,7,2};
    foo(a,4);
  15. Re: Proper syntax for template friend operator in a template class?

    I remember posting something about GCC having trouble with friends and templates. Perhaps you can find something useful in this old thread of mine?
    ...
  16. Replies
    3
    Views
    3,019

    Re: [RESOLVED] Multidimensional Array

    Thanks for the advice guys, you both pretty much suggest the same thing, which is what I ended up going with. It seems fine performance wise now, even if I do something ridicilous like make the array...
  17. Replies
    3
    Views
    3,019

    [RESOLVED] Multidimensional Array

    I´m messing around a bit with procedurally generating terrain for a game I´m working on. The terrain itself is simply represented by a 2 dimensional array which containts height values, basicaly a...
  18. Re: GCC/MinGW combining friend with templates

    Thanks.
  19. [RESOLVED] GCC/MinGW combining friend with templates

    I have this old piece of template code that I wrote a while back. Its an attempt to bring C# style properties to native C++. The code compiles fine with VS2008, but when trying to compile in...
  20. Replies
    13
    Views
    1,516

    Re: multiple instances of a class

    What constructor do you think is called when you write: MyClass obj1; ?
    Remember when you instantiate a class its constructor always gets called. If you realise which one is called, you have found...
  21. Re: Execute php page without opening browser

    If you are storing the high scores in a database, xml or plain text file you should probably just access it directly with c++.
  22. Replies
    8
    Views
    1,010

    Re: Need help with Void*

    use std::vector.
  23. Replies
    5
    Views
    1,019

    Re: Tons of errors, I don't see why.

    Search for "c++ loops" or "c++ while" and you should find plenty of useful information. It's also one of the first things most tutorials and books about c++ cover, so there should be plenty of...
  24. Replies
    6
    Views
    868

    Re: Is this "good" coding style... ?

    I agree on there being no need to reinvent the wheel. However it is generally a good idea to hide the engine, or the parts of the engine that you use behind a layer of abstraction. This will allow...
  25. Replies
    5
    Views
    1,019

    Re: Tons of errors, I don't see why.

    You really shouldn't be using goto here, its bad practise. Use a loop for what you are trying to do.
Results 1 to 25 of 92
Page 1 of 4 1 2 3 4





Click Here to Expand Forum to Full Width

Featured