• Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in multiple pthread (using loop?)

    I guess I misunderstood the assignment. To me, "sum up the vectors" means `c[0] = sum(a) + sum(b)` Sorry, I can't test your program because I'm using MS-Windows and pthread.h …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Strings in C

    >The issue is that I don't need to have same number of pairs, Not really a problem. In my previous example if there are only 5 pairs then make the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Retrieving Directory's Info (all of it)

    You're talking about MS-Windows, right? You can easily get the file info in a C program (or another language) by calling win32 api function [FindFirstFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418(v=vs.85).aspx)() and [FindNextFile](http://msdn.microsoft.com/en-us/library/windows/desktop/aa364428(v=vs.85).aspx)(). They both fill …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How to update value from file

    If you want to replace an existing line then you need another temp file. You can't just simply replace an existing line in a text file because the length of …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Strings in C

    declaration of character arrays in C is like this: `char var1[] = "1F 19 03 04 09 18 10"` Or if you want a pointer instead of an array `char* …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in multiple pthread (using loop?)

    It seems the two threads are overlapping the arrays. The first thread should add elements 0-4 and the second thread should add elements 5-9. And array C should only have …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Creating a library for use with MASM

    >Also, shouldn't it be add sp, 8 No, because bx and dx are both 2-byte (16-bit) integers. ebx and edx are 32-bit (4 byte) integers. >MASM I am using was …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Geographical segregation order?

    No ([link](https://www.google.com/#q=santa's+laughter+sounds))
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in multiple pthread (using loop?)

    Are you sure "sum up two arays" means `a[tid] + b[tid]` instead of one thread sums the values of array a and the other array sums the values in array …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Creating a library for use with MASM

    >Fatal error primes.lib: Not a valid library Now that I think about it I think MASM is a 16-bit assembler so it won't be able to read libraries compiled with …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Creating a library for use with MASM

    AFAIK masm only works with \*.lib libraries built with Microsoft compilers or other compilers that create libraries in that format. Download and isntall the free Visual Studio 2013 Express. >ont …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in emulator 8086

    >That's not entirely true, is it? Yes it is entirely true. I did not say "we do not help with your homework", i said we don't do it for you.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Geographical segregation order?

    I heard a couple years ago Santa is no longer allowed to say HoHoHo because Ho is synonymous with Hore (prostitute).
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in emulator 8086

    We don't do homework for students.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in File handling

    Probably the fastest way to do that is to read all of file2 into an in-memory array(s). Then start reading file1 line by line. Read a line, search file2 array …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Fstream

    Your file contains a lot of floats but your program is attempting to read them like integers. change myfile to be an array of floats, not integers. You also have …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Fstream

    You're original code was more like what I have in mind. Why did you change it?
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in What is your favorite English word?

    >Opsy daisy.. Never heard of it. `oopsy daisy` however is children's art or baby talk.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Post formatting

    1. Item One 2. Item Two 3. Item Three Log.i(MainActivity.class().getSimpleName(), SOME_MESSAGE); //info Log.d(MainActivity.class().getSimpleName(), SOME_MESSAGE); //debug Log.w(MainActivity.class().getSimpleName(), SOME_MESSAGE); //warning Log.e(MainActivity.class().getSimpleName(), SOME_MESSAGE); //error >List followed by code snippet does not render properly. …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [pointers] Member Access Operators: . and ->

    >Is it correct to say that, *ptr[i].state = num; the '*' dereferences the state pointer and not the array? Yes, and you must make sure that memory has been allocated …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Expression

    I would think `ab^4c^2-d/m-n` would be interpreted liks this: where ^ is power operation `a*(b^4)*(c^2)-(d/m)-n` In none of the math courses I took (or recall) did ^ represent bit operation. …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Fstream

    All the code from lines 27 to 45 needs to be outside the loop started on line 21. You don't want to do all those calculations until the entire file …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Searching and sorting

    This is a dulicate thread.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Searching and sorting

    >Am not good at c++ programes at all No one is when they first start. That's the whole point of learning.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Searching and sorting

    > got mad because of this quation Why? because you think it is too difficult? As with most programs just do it a little bit at a time. In this …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Operator Overloading problem

    move the function starting on line 28 into a \*.cpp file -- you can't put executable code in header files because the compiler will duplicate the code in each \*.cpp …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in [pointers] Member Access Operators: . and ->

    ptr[i] is not a pointer, so you need to use the dot operator . SetState() only needs one parameter, now twom In main() you would write this: for(int i = …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in chat

    We don't do your homework for you.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in the digit

    x % 10 will return the right most digit, for example if x = 15 then x%10 will return 5. Now put that in a loop, divide x by 10, …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in What is the most famous place of interest in your country?

    Probably the single most famous in USA would be the Grand Canyon.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Something wront with (probably) data input

    Is Dict storing just the pointer address passed to it by addWord()? If yes, then that would explain why passing string literals such as "dog" and "cat" works while passing …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Program crashing on function call in main

    line 124: **Tests** is an uninitialized pointer, attempting to read something into that pointer is destined to fail. Same with **TestNo** on line 133 -- no memory has been allocated …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in What do I do next! Please help

    Tutorials only scratch the surface of what you need to know about c++ language. If you really want to get into c++ programming then you will want to buy a …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in micro

    >//what would be output of this program. Why don't you compile it, run it and see for your self what the output is.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C++ Inheritance of function error

    b is a pointer to a vector, not to a Matrix2. vector's don't have transpose() method. `myMtrix2[0].transpost()` may be what you want. Or if you want to call that method …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Android Programming Research Paper Help

    you could create an Android game or some other Android app.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Program to update environment variable list.

    The environment variable is set for only the current process, it does not affect system-wide global environment variables. You can simulate the same problem by doing the same in a …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Create a tabpage programmatically visual c++

    Then it would be this: `TabPage^ tabPage3 = gcnew System::Windows::Forms::TabPage();` >I use VS2008. Upgrade your compiler.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Boost with Visual Studio and Qt simultaneously

    What compiler are you using with QT? If it's gcc then probably not because the binary libraries are different.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in How to open a webpage in C++

    Yea, that was posted 4 years ago in this thread.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in open source

    Did you decompress it after downloading?
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Get paid to answer questions

    Simple solution -- have Dani just email the mug to you.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in mode in 2-D array

    Have you ever heard of nested loops? You have two loops, one inside the other. The other loops counts the rows in the 2d array, the innter loop counts the …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Is C binary flag atomic?

    Why make assumptions that may or may not be valid? Just do it the safe way and use a semaphore to synchronize access to the byte that contains those bits.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in open source

    That appears to be a tarball, but it has no extension so I don't know how to extract it.
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in measure time inside 2 loops

    If you are using a multi-process operating system such as MS-Windows or \*nix there are lots of things outside the control of your program that could cause such behavior, such …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in mode in 2-D array

    yes,
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in mode in 2-D array

    there are probably several ways to calculate the mode, but I think the simplest was is to create another 2d array, but this time the 1st dim contains one of …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in C# programming

    We don't do homework. You write code, you post the code, and you ask questions about what you don't understand. Show the work you have done and someone will help …
  • Member Avatar for Ancient Dragon
    Ancient Dragon

    Replied To a Post in Design Issue Regarding Vectors

    You can have a vector of vectors `vector< vector<MyClass> > printerList;`

The End.