Search:

Type: Posts; User: DonFiasco

Search: Search took 0.01 seconds.

  1. fstream lets you open a file for output twice (?!)

    I am writing a program that uses a file on the disk to store configuration data, and this program both reads and writes to this file during execution. I want users to be able to run multiple...
  2. Replies
    4
    Views
    1,634

    Width is most definitely 10.

    Width is most definitely 10.
  3. Replies
    4
    Views
    1,634

    fstream::write and '\n' and '\r'

    fstream ifs(name, ios::out | ios::trunc | ios::binary);
    unsigned __int8 word[2];

    word[0]=(unsigned __int8)((unsigned __int16)width >> 8);
    word[1]=(unsigned __int8)width;
    if(!ifs.write((char...
  4. Thread: Math Issues

    by DonFiasco
    Replies
    9
    Views
    2,722

    You could also have a look at arbitrary-precision...

    You could also have a look at arbitrary-precision math libraries, like http://www.tc.umn.edu/~ringx004/mapm-main.html
  5. Thread: Code error

    by DonFiasco
    Replies
    9
    Views
    2,366

    Well firstly if (wordlist[x] != wordlist[y])...

    Well firstly

    if (wordlist[x] != wordlist[y])
    should be

    if (wordlist[x] != letterlist[y])

    Also be aware that you can overrun your letterlist buffer, and should also check for errors when...
  6. Replies
    4
    Views
    1,575

    Well that's the thing, here's the situation: ...

    Well that's the thing, here's the situation:


    class Graph
    {
    public:
    //Various methods
    private:
    vector<Vertex *> vertices;
    };
  7. Replies
    4
    Views
    1,575

    need advice with class design

    Right now I'm representing a graph as a Graph object, which has a vector of Vertex pointers, each of which represents a vertex of the graph. Each Vertex object also maintains a vector of pointers to...
  8. Thread: Ftp Help

    by DonFiasco
    Replies
    13
    Views
    1,435

    Well DiGiT I can guarantee you your problem is...

    Well DiGiT I can guarantee you your problem is one of the following:
    1. Be sure to #include <iostream>
    2. The functions you're trying to use are in the std namespace, so either use std::cout and...
  9. Replies
    3
    Views
    1,462

    Doesn't the use of array[100] also fail your...

    Doesn't the use of array[100] also fail your Quality Control Service? Especially since the use of an array there seems superfluous - you're only dealing with one float at a time, so just use a single...
  10. Replies
    9
    Views
    1,427

    #include void test2(void) { ...

    #include <stdio.h>

    void test2(void)
    {
    printf("Unfortunately this doesn't work on my compiler/system.\n";
    exit(0);
    }

    void test1(void)
    {
  11. Replies
    2
    Views
    3,292

    Certainly. The constructor code: ...

    Certainly.

    The constructor code:


    CTime::CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST)
    {
    struct tm atm;
    atm.tm_sec = nSec;
    atm.tm_min = nMin;
  12. Replies
    2
    Views
    3,292

    Strange behavior with CDateTimeCtrl

    I'm using MSVC++ 6 in Windows XP Pro SP2, and trying to write a simple dialog with a date/time picker control, and am experiencing some strange behavior; when I try to UpdateData() after entering a...
Results 1 to 12 of 12