Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Showing results 1 to 40 of 500
Search took 0.04 seconds.
Search: Posts Made By: Ancient Dragon
Forum: C++ Jun 5th, 2014, 9:32 PM
Replies: 7
Views: 6,291
Posted By Ancient Dragon
Re: Trouble with Lines

you might want to read this discussion (http://stackoverflow.com/questions/1282295/what-exactly-is-nullptr)
Forum: C++ Jun 3rd, 2014, 8:12 PM
Replies: 7
Views: 6,291
Posted By Ancient Dragon
Re: Trouble with Lines

I didn't mean to imply the things you have done are travel but what can be done with console programs.
Forum: C++ Jun 3rd, 2014, 2:45 PM
Replies: 7
Views: 6,291
Posted By Ancient Dragon
Re: Trouble with Lines

No, not really, as you have already found out.
Forum: C++ Jun 3rd, 2014, 8:35 AM
Replies: 7
Views: 6,291
Posted By Ancient Dragon
Re: Trouble with Lines

console programs do not support graphics beyond very travel things. You need to write a win32 program to do more complex things.
Forum: Databases May 20th, 2014, 9:09 AM
Replies: 7
Views: 5,885
Posted By Ancient Dragon
Re: Ms Access - Reverse Table

Because I know of no SQL way to do it. Fairly easy in C or C++.
Forum: Databases May 19th, 2014, 1:27 PM
Replies: 7
Views: 5,885
Posted By Ancient Dragon
Re: Ms Access - Reverse Table

Alternative approach is to export the table into a text file then write a program in another language to reformat it.
Forum: Visual Basic .NET May 19th, 2014, 1:25 PM
Replies: 10
Views: 8,457
Posted By Ancient Dragon
Re: Input Snag

Certainly, use the code in your post #3 if all you want to do is print the string that you typed. But you have to do a little more if you want to enter 2 integers then add them together.
Forum: Databases May 19th, 2014, 10:19 AM
Replies: 7
Views: 5,885
Posted By Ancient Dragon
Re: Ms Access - Reverse Table

The easiest and quickest way is to just re-enter all the data in the new format.
Forum: Visual Basic .NET May 18th, 2014, 9:36 PM
Replies: 10
Views: 8,457
Posted By Ancient Dragon
Re: Input Snag

Get input as string, split the string as in my previous example, then convert each part to integer


Console.Write("Enter two integers, and then press enter: ")
Dim a As String =...
Forum: Visual Basic .NET May 18th, 2014, 6:46 PM
Replies: 10
Views: 8,457
Posted By Ancient Dragon
Re: Input Snag

That's probably because VB.NET really shines at GUI applications. It has only minimal support for console.
Forum: Visual Basic .NET May 14th, 2014, 8:25 AM
Replies: 10
Views: 8,457
Posted By Ancient Dragon
Re: Input Snag

I had this in mind where you split the sentence into individual words.


Sub Main()
Dim a As String

Console.Write("Enter user first and last name, and then press enter: ")
...
Forum: Visual Basic .NET May 13th, 2014, 7:30 PM
Replies: 10
Views: 8,457
Posted By Ancient Dragon
Re: Input Snag

I suppose you could enter both first and last names into the same string, then split the string at the space.

BTW: here (http://www.homeandlearn.co.uk/NET/vbNet.html)is a tutorial I found very...
Forum: C May 11th, 2014, 9:41 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

Yes, you can use forums here, but DaniWeb is a more active forum with over 1 million members. Don't be afraid to join other forums too.
Forum: C May 11th, 2014, 12:34 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

If you are using Visual Studio 2010 or newer then you are using vb.net.

Go ahead and join DaniWeb -- ProgrammingForums.org is owned by DaniWeb.
Forum: C May 10th, 2014, 5:32 PM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

Are you a member of DaniWeb.com? If not, you should be. They have very good support for languages such as vb.net. I'm not that good in vb.net either, haven't used it much.
Forum: C May 10th, 2014, 2:29 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

I know of nothing that will teach you how to convert c++ to c, it's just a simple matter of knowing both languages well so that you readily recognize the differences -- most of that is through many...
Forum: C May 9th, 2014, 4:32 PM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

In c++ each class method has a hidden parameter called this which is a pointer to an instance of the class. If you convert the c++ class to a c structure you need to make the class methods global...
Forum: C May 8th, 2014, 5:47 PM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

lines 11 and 12: Why create another struct Moon object -- just use the one in the parameter to that function. Creating a second Moon object is pretty much useless.
Forum: C May 8th, 2014, 10:48 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

You also have to make other changes, such as

Line 24: static struct Moon moon;

line 54: drawMoon(&moon);

line 81: createMoon(&moon);.

And make similar changes to class Orbiter.
Forum: C May 8th, 2014, 8:17 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

Yes, but not easily. First you will have to change Class Moon into a structure, move the class methods into simple global functions. Change the functions to accept a pointer to the struct Moon...
Forum: C May 4th, 2014, 8:28 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

But the code you are having problems with is c++, not C. Don't you think you should be compiling c++ code as c++ and not C???
Forum: C May 3rd, 2014, 10:21 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

Why are you trying to do this with C instead of C++??? You're just making it much more difficult than it needs to be for yourself.
Forum: C May 2nd, 2014, 9:36 PM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

did you try to just delete line 6?
Forum: C Apr 29th, 2014, 2:36 PM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

Visual C++ IDE/compiler knows nothing at all about OpenGL or it's standard. <glut.h> is not included in the standard compiler's installation.
Forum: C Apr 29th, 2014, 10:04 AM
Replies: 30
Views: 15,744
Posted By Ancient Dragon
Re: glutDisplayFunc(); warning

In C there is a difference between foo() and foo(void). foo() is a function that takes an unspecified number of parameters or no parameters at all, while foo(void) is a function that takes no...
Forum: C++ Apr 24th, 2014, 9:08 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

I don't know what that is. Maybe it's the colors and line numbers you use. I just use the default, which is white background and black font, no line numbers.
Forum: C++ Apr 24th, 2014, 8:21 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

Did you read the link I gave you? The only questionable one is the version of DirectX that's installed in your computer. Here (http://support.microsoft.com/kb/157730/en-US)is how to find that out.
Forum: C++ Apr 23rd, 2014, 6:19 PM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

Does your computer meed the minimum requirements stated here (http://www.visualstudio.com/products/visual-studio-express-vs)?
Forum: C++ Apr 23rd, 2014, 4:16 PM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

Sometimes I get that when the program is busy doing something, such as downloading, and I try to move the window. Just leave it alone for awhile because the install may not be finished yet.
Forum: C++ Apr 23rd, 2014, 9:03 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

>With this new C++11 standard are there any uses left over for begin() and end().

Yes, certainly when function parameters require it, such as std::sort

Note that VS 2013 is not fully c++11...
Forum: C++ Apr 22nd, 2014, 9:26 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Forum: C++ Apr 21st, 2014, 5:49 PM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

I don't think you can just get VC++ 2013, you have to download the entire visual studio 2013 suite. (http://www.visualstudio.com/en-us/downloads)
Forum: C++ Apr 21st, 2014, 9:47 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

how much RAM and how much free hard drive space does your laptop have? If you can't upgrade then you won't be able to take advantage of any c++11 features.
Forum: C++ Apr 21st, 2014, 7:00 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

VS 2010 is not c++11 compliant -- get VS2013 or get latest version of Code::Blocks w/MinGW compiler. I'd suggest CB because VS is not fully c++11 compliant either.
Forum: C++ Apr 20th, 2014, 4:58 PM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

line 24 can be reduced to this:

for( auto c : b)
{
cout << setw (4) << *c << '\n';
}


vectors are really not much more than smart arrays. So anything you can do with an array you can do with a...
Forum: C++ Apr 20th, 2014, 11:07 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

Yes, and no. using namespace std: can be dangerous and cause unintended errors when a name in std namespace conflicts with a name you have chosen for your program. That's why it's better to use...
Forum: C++ Apr 20th, 2014, 8:27 AM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

>You cannot use auto to define variables initialized with primitives

Yes you can (see The C++ Programming Language, 4th Edition). This is perfectly legal


int main()
{
auto s = "Hello,...
Forum: C++ Apr 19th, 2014, 6:28 PM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

You can't use auto in C language. You could use auto extensively in c++, but to be honest I would prefer to declare variables the old way. I'm not a big fan of auto except when auto is easier to...
Forum: C++ Apr 18th, 2014, 4:54 PM
Replies: 34
Views: 15,986
Posted By Ancient Dragon
Re: Vectors

line 24: in c++11 has a new way to express that using a data type called auto. With auto you don't have to express the data type. Example:

for(auto x : b)
{

}


The above is the same as what you...
Forum: Python Apr 14th, 2014, 8:07 AM
Replies: 2
Views: 5,279
Posted By Ancient Dragon
Re: Plz I really need your help

I normally don't answer questions in this forum, but looks to me like you have reversed lines 7 and 8 and lines 10 and 11. If the program returns on line 7 how can line 8 be executed?? same with...
Showing results 1 to 40 of 500

 
Forum Jump



DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:36 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC