Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>is it a big task?
Yes -- Microsoft has been developing theirs for some 20 years now.

>>can anyone explain me or direct me to a concept that explains this?
Just buy the educational version (I assume you are a student, so you are eligible for huge discounts), install, and learn to use VC++ 2008. This will give you all the features you are looking for -- plus a lot you don't need for your project.

I don't know of a free IDE that contains drawing tools.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Wow! That was a thrilling match.
But honestly, 50 grand is a huge price amount for just standing and making gestures ! :-/

Look at the money Tiger Woods makes for just hitting his balls around the yard :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

if she hadnt have a boy friend... ;)

Probably her husband -- she has children so I assume she is probably married. But one can't really say nowdays :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 22: fgets() doesn't return '\n'. Read this . If the line read contains '\n' then the last character in the input buffer will also be '\n' and in that case you need to strip it off if you want the line to be useful.

if( stg[strlen(stg)-1] == '\n')
    stg[strlen(stg)-1] = 0;

line 24: the value of variable i is uninitialized so all it contains is some random value.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You have to read the manufacturer's programmers manual, or call them and ask them.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you need to write an event handler for each of those buttons. Inside the event handler is where you put the code to load and display the image you want. As I recall, to create an event handler function for a button just right-click the button and you will see the option(s).

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Beethoven Morse Code Symphony. Sorry about the short commercial at the beginning.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't use those, but I think I read someone say g++ and gcc have an option to produce 64-bit programs.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what compiler and operating system. It could be a limit of your os and/or compiler. Try your program on a 64-bit os, such as 64-bit XP or Vista and see if that fixes it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>any chance you could show me abit of code on how it would be done?

Nope --but possibly the windows debug api might be useful

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>int size=0;
>int *parr= new int;
For starters, size isn't a compile-time constant, which means you're relying on a compiler extension and your code is thus non-portable

I think you just had a brain fart :) There is nothing wrong with calling new with a non-const integer. Maybe you were thinking this: int parr[size];

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

maybe you need to rearrange the program so that it does this

Do you want chocolate, vanilla or twist?
chocolate
hot fudge, chocolate or strawberry sauce?
hot fudge
Do you want sprinkles (yes/no)?
no
You ordered chocolate ice cream with hot fudge sauce without sprinkles.
Press any key to continue . . .

[edit]Same as ^^^ suggested :) [/edit]

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

try the following

select b.SAL_ACC ,b.NAME ,b.ADV ,b.DT_PREP from mstr a,detail b where a.psno=b.psno

As vb5prgrmr pointed out, a join is not even necessary because all the data can be obtained from one table.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Amazing. Visiting the Geeks' Lounge is like sitting in a room full of children.

Maybe because half DaniWeb members ARE children. How many members posting here are under 21 years old?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have no idea, but start here

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

At this point I think you probably need to use your compiler's debugger, put a break point on that write line and inspect the value of that array. You have only posted one line from your program so its pretty impossible for anyone to tell you the solution to the problem. Possibly its not that line at all but somewhere else in the program, such as memory corruption.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

From what you posted earlier it still looks like rgbb is uninitialized. Do you write rgbb in text files too?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Probably a permissions problem. When doing backups, what account is the backup program running under? It needs to run under an account that has admin permissions on your XP computer.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Invision Power Board is a good one, it's also got a lot of free add-ons to add just about any feature you could want. but a Permanent License costs $130. ^^;;;
Demo : free forums

vBulletin isn't free either.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Umm, maybe you misunderstood me (?). I was not trying to say that MSVC 6.0 cannot be used on Windows versions later than "Windows Server 2003".

Instead, I was trying to say that the "Windows Server 2003 Platform SDK" is the last SDK version that is compatible and works with MSVC 6.0.

Oops! you are right.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what includes are you using? maybe one of them also includes string.h

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Okay so i have windows XP, Microsoft Visual C++ 2008 Express Edition, what SDK do i need?

Depends on what you are trying to do. The compiler contains everything you need to write simple gui programs using win32 api functions. If you want MFC then you can't use the Express edition at all because it doesn't support MFC. If you want something beyond the basic gui functions then you probably should download the entire Windows Platform SDK, which is quite large.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

With MSVC 6.0, the latest Windows SDK that can be used is the Windows Server 2003 Platform SDK

Either switch to that old SDK or get e.g. a VS Express edition, which works with your current SDK.

I'm running MSVC 6.0 on Vista Home Premium, but I agree with upgrading to VC++ 2008 (Express or another version)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Its a pointer to struct PIXELS with :
int rgb[3];//for ascii
char rgbb[3];//for binary

why not just use a union, which means the same memory location could be accessed by either an int or char array

struct PICX
{
    union {
       int rgb[3];//for ascii
       char rgbb[sizeof(int)];//for binary
    }
};

>>PIXELS *img_pix = new PIXELS[width*height];

writer.write(reinterpret_cast<char*>(&img_pix.rgbb[0]) ,sizeof(&img_pix.rgbb[0] );

Does rgbb contain anything? Is it just an uninitialized array? Use the union concept mentioned above might resolve that if your program populates the int first.

[edit]
On second thought, if all you use rgbb for is to write out to the file, then you don't need it at all nor would you even need the union

writer.write(reinterpret_cast<char*>(&img_pix[i].rgb) ,sizeof(img_pix[i].rgb));
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Hi again
I opened the new file with word pad, the problem is theres a lot of memory junk being writed on the end of the file (ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ...) lots and lots

Any idea of what can I be doing wrong?

You aren't doing anything wrong. You can't view binary files with Notepad because they contain binary data that Notepad doesn't know how to display. Notepad can only display text files, not binary files.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

who is the guy playing the guitar?

I have no idea who he is. I was just listening to that video because of its content when it turned into someone playing the guitar, and I thought you might be interested.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Theme from piano concerto no.1 , peter Tchaikovsky, for guitar
http://www.youtube.com/watch?v=mCLAAAoqhcQ

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

moved

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

use static allocation unless (1) your os and compiler have very limited stack space, or (2) the objects are huge. Declaring STL containers like vector dynamicall is just a waste of time/effort because they only consume about 20 bytes of memory anyway.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

cout << "Error!\n";

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Note that fgets() will also append '\n' to the end of the string if it appears in the input stream.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Vista has changed a lot of things, one of them is it won't run the graphics programs produced by the old Turbo C compilers. You have to use a new compiler and use normal win32 api graphics functions which are NOT GBI. So you have to just forget everything you thought you knew about TurboC graphics and learn everything all over again from scratch. You can find tutorials all over the net.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

use the >> operator instead of getline() Here is one way to do it.

int main()
{
    uint id;
    uint starttime;
    uint finishtime;
    float locx;
    float locy;
    string temp;
    string instancename;
    uint duration;
    uint skill;

    ifstream in("test1.txt");
    if( !in.is_open() )
    {
        cout << "Can't open the file\n";
        return 1;
    }
// read header line
    in >> temp; // "instance"
    in >> instancename;
//
// now put the below in a loop until end-of-file
//
    in >> temp; // "res"
    in >> id;
    in >> starttime; 
    // etc. etc.


}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You can use the division operator / to extract the number of hours and minutes. How many seconds in an hour? How many in one minute?

8230 / (60 * 60) = number of hours

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

try this. I have vc++ 6.0 sp 6 installed

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

integer digits are also characters. For example '0', '1', '2', ... '9' are all ascii characters just as 'a', 'b', ... 'z' are ascii characters.

Its quite easy to convert an ascii numeric character to an integer -- just subtract '0'

int x = '0' - '0'; // result is 0
x = '1' - '0'; // result is 1
...

Why does that work? Look at any standard ascii chart and you will see that every character in the ascii chart has a numeric equivalent. When you code x = '1' - '0' the compiler looks up those charcters in the ascii chart and converts them to their numeric equivalents x = 49 - 48;

lllllIllIlllI commented: nice +1
tux4life commented: nice, didn't know it was possible ... very useful post ! +1
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>if (currentfile == "instance")

currentfile is an ifstream object, so it can not be compared to a string. Do you mean filename instead of currentfile ? If yes, then you will have to use strcmp() to compare the two character arrays.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>> The big bang wasn't a gas ball. - Rashakil Fol

According to this I think it was

The Big Bang is the cosmological model of the initial conditions and subsequent development of the universe supported by the most comprehensive and accurate explanations from current scientific evidence and observation.[1][2] As used by cosmologists, the term Big Bang generally refers to the idea that the universe has expanded from a primordial hot and dense initial condition at some finite time in the past, and continues to expand to this day.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

In addition to what Ancient already mentioned:
Change #include "windows.h" to #include <windows.h>

It really doesn't matter with that compiler.

Nick Evan commented: Didn't know that +14
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Thanks for posting those links -- I've been wondering where they went. Made this thread sticky so that it stays where we can easily find it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Sounds like you have a broad idea presented and you need to develop a project within those guidelines. I wish my boss did that more often! .

Yes, but then the end product would probably not be what the customer wanted :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>it should yield a result of product as gud
gud is not in any English language dictionary that I know of, so I have no idea what you mean by that.

>>I need a c++ program dealing with sales and marketing

First you need to define the problem better. What, exactly, is it supposed to do? What exactly do you mean by "sales data" ? Before writing a program you have to clearly write down on paper exactly what you want and how it is to go about doing it.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Here is the right way to do it

void createAlpha(char ***data, int elements)
{
    int i;
    char **temp = malloc(elements * sizeof(char *));
    for(i = 0; i < elements; i++)
        temp[i] = 0;
    temp[0] = "Hello";
    temp[1] = "World";
    temp[2] = "Another";
    *data = temp;

}


int main()
{
    char **data = 0;
    int i;
    createAlpha(&data, 10);
    for(i = 0; i < 10 && data[i] != 0; i++)
    {
        printf("%s\n", data[i]);
    }
    return 0;
 
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

What version of Windows are you running? I have Vista but some people say that VC++ 6.0 doesn't work right on that os. Recommend you upgrade to the latest version of the compiler -- VC++ 2008 Express is free but doesn't support MFC.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Ohhh that requires a Quick Time plugin that I don't have, and can't install.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Auditory : 56%
Visual : 43%
Left : 52%
Right : 47%

Now nobody can say I'm not level headed :)

Ancient, your hemispheric dominance is equally divided between left and right brain, while you show a moderate preference for auditory versus visual learning, signs of a balanced and flexible person.

Your balance gives you the enviable capacity to be verbal and literate while retaining a certain "flair" and individuality. You are logical and compliant but only to a degree. You are organized without being compulsive, goal-directed without being driven, and a "thinking" individual without being excessively so.

The one problem you might have is that your learning might not be as efficient as you would like. At times you will work from the specific to the general, while at other times you'll work from the general to the specific. Sometimes you will be logical in your approach while at other times random. Since you cannot always control the choice, you may experience frustrations not normally felt by persons with a more defined and directed learning style.

You may also minimally experience conflicts associated with auditory processing. You will be systematic and sequential in your processing of information, you will most often focus on a single dimension of the problem or material, and you will be more reflective, i.e., "taking the data in" as opposed to "devouring" it.

Overall, you should feel content with your life and yourself. You are, …

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I started a new empty windows project, pasted your code and it compiled without any errors or warnings. When you created your project did you create a console project or windows project. It must be a windows project.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

With the while statement, the function will call itself billions of times. Try this version and see the results

#include <iostream>

using namespace std;

long long counter = 0;
void countdown(int x)
{
    ++counter;
    if( counter % 10000000 == 0)
        cout << counter << "\n";
    //cout<<x<<endl;
    while(x > 0)
    {
        countdown(x-1);
    }
}

int main(void)
{
countdown(10);
cout << "counter = " << counter << "\n";
return 0;
}