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

There is quite difference between the Programmer and Software Engineer..A programmer can be Software Engineer..But a Software Engineer May or Mat not a PRogrammer.

Isn't that saying the same thing? A can be B, but B may or may not be A? In otherwords, there is no difference.

I would be seriously choked if I only got 60k a year. I am pretty sure that's what labourers make that dropped out of highschool. I live in Canada but I am pretty sure technology fields pay about the same between us and the US though we have no technology super-giants here like Microsoft or Facebook who offer above average salaries for good devs.

Salary varies quite a bit around the USA, people on the west coast might find it difficult to survive on $100,000/year, while here in the mid-west that would be an outstanding salary. It varies greatly just within 30 mile radius of where I work, I gladly changed jobs at lower salary just to avoid the St Louis daily traffic commute.

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

delete line 17 because the memory allocation is not necessary. strstr() returns the pointer that you want to use.

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

It worked ok for me with Chrome on 64-bit Windows 7

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

Here is another tutorial on pointes

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

Code::Blocks normally puts all *.h and *.cpp files in the same folder as the project itself. If you move those files somewhere else you will have to tell CB where to find them.

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

Here is a list of all c++ keywords -- notice cout and cin are not in the list.

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

asm programs have to be assembled with an assembler like MASM or TASM. Can't be done with VS.

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

Please mark this thread Solved.

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


Btw, nice Galaxy tablet you got there :) How much did you pay for it?

Mine was pretty cheap because it was last year's model and the Sprint store wanted to get rid of it -- just like buying previous year's model car. As I recall it was somewhere around $125.00 USD. I also had them put Sprint on it so that I can use the web/email when not in range of a WIFI.

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

Have you seen this example program? Put an if statement around line 21 to insure the query succeeded.

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

I don't think there is, but I'd also love to have one to make it easier to view DaniWeb on my new Galaxy tablet.

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

Well since I got in a little late I'll spare no other's ego any expense.

C++ still has the same drawbacks it's always had since I've been programming, and it's very nature implies that it doesn't have a built-in Microsoft Word file format interpreter that gets updated every time M$ releases a new version, it doesn't have a built-in IE based Web Browser for browser automation tasks, and it doesn't have a built-in Microsoft copyright logo creator.

Since c++ is not a Microsoft product why would you expect the language to contain those things? C++ was not even invented by Microsoft. If you want all that support for Microsoft Office then use a different language which is designed for that purpose.

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

I expect most retirees to continue working part-time in the near future because there just isn't going to be the money to pay their pensions. The current scheme of the young workers of today paying the pension of the retirees won't work when there are almost the same number of retirees as young workers, and our solution to this problem has been to ignore it until we start reaching crisis. People are living longer and are staying healthy for longer. Since more and more work doesn't require physical labour people will still be fit to work many years past retirement age.

I've earned two retirement pensions -- one US military and the other social security. I don't see how I could possibly maintain my customary standard of living without both pensions. SS is not now, nor was it ever, intended to be the sole support for old people. Its purpose is only to give them enough money to provide the most basic living needs, such as food and a roof over their heads. If they want new cars, vacations, etc they should have earned it during their younger years.

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

>>No, you have to specify when doing a new project that it is a Managed C++ or C++/CLI project. I'm not sure that just "Visual C++" has that option, you might need a "Visual Studio .NET" version.


See the screen shot I posted -- I used VC++ 2010 Express to generate it.

mike_2000_17 commented: thanks for clarifying! Clearly I'm no MS expert. +14
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>> vector<int> vectorOne(29);

The array on line 10 and the vector only have 29 items, not 30. If you want 30 then say so. Count them on your fingers if you need to verify, 0, 1, 2, 3, ... 29, 30.

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

When you create a new project with VC++ 2010 you have the option to create standard C++ or CLR/C++ (M$ doesn't call it "managed" any more, but CLR). See attached screen shot. With CLR/C++ you can call most, if not all, the same functions that can be called by C#.

I have not done extensive CLR/C++ programming either, just enough to get dangerous.

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

TASM is also a programming language and can do anything.

TASM is an assembler, not a language. It's no more of a language than VC++ 2010, Turbo C. or gcc

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

You probably installed the 64-bit version of MySQL server??? That's what I did, and I had to uninstall it and install the 32-bit version because that compiler can not generate 64-bit code.

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

>>c=&b[1];

It might help if you posted code that compiles. The above line is an error because its trying to convert char* to int*, which can't be done without a typecast.

Next, it displays funny characters because array b[] is an array of binary values, which are not displayable. If you want them to display correctly you need to make them characters, such as char b[] = "'1','2','3','4'};

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

Looks ok to me on both IE9 and Chrome.

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

Where are your answers? Post your answers and we will tell you whether you are on the right track or not.

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

What compiler are you using. I just compiled it with VC++ 2010 Express, deleted the duplicate pi variable, and it compiled/linked without any errors.

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

If you are trying to do console programming then you should be using the MS-Windows Console Functions. Moving the mouse pointer to some screen location will not allow you to start typing at that location, you have to move the cursor

Example console program

#include <iostream>
#include <Windows.h>

using std::cout;

int main()
{
    HANDLE StdOut = GetStdHandle(STD_OUTPUT_HANDLE);
       
    COORD c = {5,10};
    SetConsoleCursorPosition(StdOut,c);
    cout << "Hello World\n";
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

you declared two variables named pi, one is double and the other is float. Delete one of the two (preferably the one inside main() because it is uninitialized).

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

I just started a new store (see my signature for link). It was set up on IPage with a few simple steps. The problem is that I don't know how to calculate shipping costs. How is that done for UPS? Also how about sales taxes? AFAIK USA does not have sales taxes on web products, but I could easily be wrong about that. Am I supposed to collect sales taxes?

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

The Earth will most likely survive the next few billion years, but humans will not. I watched a film on TV just this morning about what might happen when the supervolcano beneath the Yellowstone National Park (USA) will erupt and will wipe out all life on the North American continent. People in Europe and Africa are not immune either because they also have similar supervolcanoes, but the one at Yellowstone is the most active.

The Yellowstone Caldera is the largest volcanic system in North America. It has been termed a "supervolcano" because the caldera was formed by exceptionally large explosive eruptions. The current caldera was created by a cataclysmic eruption that occurred 640,000 years ago, which released 240 cubic miles (1,000 km³) of ash, rock and pyroclastic materials. This eruption was 1,000 times larger than the 1980 eruption of Mount St. Helens (USA).

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

you have to call WinHttpCloseHandle () within the loop so that it is closed after each call to WinHttpConnect(). MOve lines 86-88 up above line 83.

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

I agree. Such a knowledgeable person at such a young age is very rare. Unless he burns out quickly he will have a pretty bright career ahead of him.

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

One way that will happen is if you declare some object in a *.h (header) file then include that file in two or more *.c or *.cpp files. You have to use the extern keyword in the header file to prevent that, then you will have to declare it again without extern in one of the *.c or *.cpp files.

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

vc++ 2010 Express and Code::Blocks are both good, free compilers and IDEs.

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

They are now called "Today's Posts" and "unanswered threads" the links on that purple ribbon at the bottom of the screen (it may be somewhere else when looking at DaniWeb on a tablet)

jbennet commented: cheers +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

look at the class at the top of your file. It says on line 40 that the function doesn't return anything because it is a void function. All that function does is call cin to get something from the keyboard.

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

The death penalty may not deter criminals, but it sure does give some relief and closure for the loved ones of the victims.

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

line 209: getmodeno() is a void function so it can not be used as a parameter to strcmpi()

I am getting the impression that you did not write the code you posted, but just pasted it into your program. You need to look at the error message, then look at the line that the error message occurred. Most of the time the compiler will tell you what is wrong.

The next error, line 212, is actually caused by the semicolon on at the end of the if statement on line 208.

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

I see a mod has fixed up the code tags for you.

Line 204: see that semicolon at the end of that if statement? Delete the semicolon.

line 208: The typecast is incorrect. It should be char* not char

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

The error messages give you the line number on which the error occurs. I'm not going to count the lines in the code you posted, so I won't bother helping you any more than that.

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

vc++ 2008 version is no longer available. The only version is now vc++ 2010 and link in the previous post.

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

we have just made a band...plz tel us da way v cn rys...nd da popular rock songs v shud do..plz

Wow! This is got to be among the most unintelligible and illiterate posts I have ever seen on DaniWeb.

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

Would love a coffee mug with my avatar and DaniWeb slogan.

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

I don't know, but a good place to start searching is google.

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

If you google for libcurl you will have found links to example C code.

The first thing you have to do is compile the library. How to do that will depend on the operating system and compiler you are using. The download appears to only support VC++ 6.0 on MS-Windows. I tried to have VC++ 2010 convert the VC++ 6.0 *.dsw file but the conversion failed. When I get time I'm going to have to install VC++ 6.0 on my Windows 7 computer (I already have that compiler/IDE) to see what files are in the project and then create a VC++ 2010 project accordingly. But that may not happen for over a week due to other more pressing obligations I currently have. Hopefully someone else will have already made the conversion.

[edit]Here you can get pre-built libcurl library, one for cygwin and another version for generic.

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

I used its built-in debugger to do that. Compile the program in debug mode. But if you allocated the array with new or maloc() using pointers then vc++ 2010 can't display the contents like that (see code example below)

int main()
{
    int **ay = new int*[3];
    for(int i = 0; i < 3; i++)
    {
        ay[i] = new int[5];
        for(int j = 0; j < 5; j++)
            ay[i][j] = (i+1) * (j+1);
    }

    std::cin >> ay[0][0];
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

USA has had its share of such problems since 1960 (LA bombings), and how about those car burnings in France about a year or so ago. Nigeria is more noted for its spam and scams then as a terrorist nation.

susheelsundar commented: You are way right sir. i was about to say that Nigeria is a heaven for criminals +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You mean like this?

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

ride on the world's largest rollrecoaster and scare myself to death

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

how can use the while loop to print my name 10 times

Have you studied your text book about loops? If not then you should do so now. You will have to create an int variable that will be used to count from 0 to 10.

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

If you declare variable counter as a static member of class Event then there will be only one instance of that variable regardless of how many times class Event is used as the base class.

#include <iostream>
using std::cout;

// you could put these classes in a header file
class Event
{
public:
    static int counter;
protected:
    static int get_event_id() {return counter;}
public:
    virtual int type() = 0;
};

class A: public Event
{
public:
    A() 
    {
        Event::counter++;
        cout << "A::Event::type = " << get_event_id() << '\n';
    };
    virtual int type() {return 0;}
};

class B: public Event
{
public:
    B() 
    {
        Event::counter++;
        cout << "B::Event::type = " << get_event_id() << '\n';
    };
    virtual int type() {return 0;}
};

// The following must be in a *.cpp file
int Event::counter = 0;

int main()
{
    A a;
    B b;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Still not sure why it wouldn't give you an error message.

It does now because I just tried it by intentially entering the wrong password. Must have been something else I did.

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

Here is the Samsung Galexy Tab that I have

Good News! I'm in now :) I probably mis-typed my user name and/or password. Everything seems to be working now. The bad news is that all the fonts and text are too small for me to read.

The login edit boxes are just too small, need to make them a little wider (horizontal width) for people with long names such as mine that won't fit on the screen without scrolling.

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

Yesterday I bought a new Galexy Tab (similar to IPad but 1/3 the cost), but was unable to log into DaniWeb. Has anyone else tried it with IPad or similar product? After I clicked the login button it just erased my password and refused to let me log in with no error message(s)