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

The warnings don't really matter, there are usually a few warnings in every application, its the errors that matter.
Ruby is a scripting language and Rails is a web development library that is used with ruby

Wong! Most warnings are really errors. If you don't fix them then you are setting yourself up for a lot of headaches. Depending on the compiler there may be a few warnings that can be safely ignored, but making a blanket statement like you did is just plain dangerous.

Eliza: Here is an example of using SqlIte on Windows.

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

You could try something like below...I

That should produce an error because \' ' is not a valid escape sequence.

If you don't like the default spacing then don't use tabs. Do something like this: printf("%-20s", "Hello World"); where the text string will be left-justified in a field 20 characters wide, right-side padded with spaces.

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

Now that I have Win7 set up the way I want it, is it possible to create an image on a bootable DVD so that if (and when) my computer crashes I can just reinstall everything from that image? I seem to recall something like that was done on my last job, but I don't know how.

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

>>well besides printing 1 to the display..

The reason for that should be obvious.

Also compiled with Code::Blocks using MinGW (gcc 3.4.5) and it worked ok.

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

Worked fine for me using vc++ 2008 express

ans->1
enter a value/guess->1234
found it!
Press any key to continue . . .

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

Many games that run on XP will not run on Win7. So if you are a big gammer and like the games you are playing, then stick with XP.

Portgas D. Ace commented: Incorrect bro. -1
debasisdas commented: agree +13
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I have HP OfficeJet All-In-One 6500. I just went to hp.com to find out if they have an updated program and it says

Installing the Product with the USB Cable and Using the Driver Located in Windows 7 Until the Product Driver is Available for Download

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

>>while ((addr = ((void*(*)(void))addr)())

Didn't your compiler produce an error or warning on that line?? tryit() does not return a value, yet in the above addr is being assigned the return value of tryint(). You can't have it both ways. try this: while( addr() )

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

line 61 in the code you posted: That function displays random/wrong values because it is using uninitialized variables.

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

>>which c++ compiler is easy n best?
Those are two exclusive requests -- the best compiler/IDE is not necessarily the easiest to use. If you want ease of use then you will probably have to sacrifice power.

Dev-C++ is probably the easiest IDE to use, but IMHO VC++ 2008 Express is the best.

Code::Blocks is another good choice -- also free.

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

I have only seen a couple of incompatabilities -- one of my games that played ok on Vista Home will not play on Win7. Also, the other day I bought a blue-ray video that contained a file that I could copy to my pc. Guess what?? It won't recognize Win7.

There are still a few device drivers that are not yet ready for Win7. One of them is for HP printer. The basic driver for my printer works ok, but hp has a much larger program that has not yet been ported.

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

Yes, start out by opening the file and learning how to just read it. Just display the file contents on the screen.

After you get that going, you should be able to start reading the file contents into the structure. You didn't say how the file is layed out so I can't really help you any more.

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

Why don't you solve them yourself? You won't learn anything by cheating.

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

It returns gibberish because when that NextTag() returns the array radial is destroyed, which invalidates tags[1]. What you need to do is allocate memory for the text. Then main() will have to delete[] that memory when its done with it.

tags[1] = new char[strlen(radia1)+1];
strcpy(tags[1], radia1);

Another way to do it is for main() to allocate memory for that string

char* tags[4] = {0};
char radia1[80];
tags[1] = radia1;
...
...
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

If the item numbers are consecutive (no missing numbers) then you don't need to keep them in an array. Just use the array index of the text array as the item number. One way to do it is like this:

std::string item;
// get item number, which is ended with a period
getline(fin, item, '.');
// get the reset of the line
getline(fin,item);
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>> line 20: fflush(stdin);
fflush() is only guaranteed to work with output streams, not input streams.

>> line 21: gets(p)

Two problems:

  1. never ever use gets() because it may write beyone the bounds of the array, causing your program to crash. Use fgets() instead.
  2. Variable p is an array of 40 pointers. You have to allocate memory for those pointers before they can be used. Suggest you code it something like this: char p[40][80]; , which is an array of 40 character arrays, and each array can hold up to 80 characters.

>>line 38: if( strcmp((p+i),(p+j)) > 0 )
Delete that and uncomment the algorithm on line 44.

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

Deposit $10,000.00 USD in my PayPal account and I will write one for you :)

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

Initialize the array by flooding it with all 0s. char title[10] = {0};

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

lines 8 and 11 of the first code are using uninitialized variable ch

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

Methinks Express indludes

No it doesn't have it.

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

1) Line 13 is wrong. It should use the == boolean operator, not the = assignment operator.

>>If not, specify a situiation in which this version will fail.

I can think of three kinds of data for which that algorithm will fail. If you think about the different kinds of data then you should be able to list at least one of them too.

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

variable ptrA needs to have three stars

#define maxrows  2
#define maxcols 5


int main()
{
	double a[maxrows][maxcols];
	double ***ptrA = malloc(maxrows * sizeof(double*));
	int i,j;

	for(i = 0; i < maxrows; i++)
	{
		ptrA[i] = malloc(maxcols * sizeof(double*));
		for(j = 0; j < maxcols; j++)
		{
			ptrA[i][j] = &a[i][j];
		}
	}
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You should not be using tabs but setw() method. Tabs may display differently on different computers/monitors. I think setw() will give you a consistent appearance.

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

If you are going to do this kind of advanced-level programming then you really need to learn how to debug your own errors. The problem is those two defines on lines 552 and 553. Delete them.

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

>>What should I use instead on void main() int main()

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

But, conversely, any business infrastructure worth it's salt will rely on *nix servers to run their networks. Exchange servers may be well and good for the office LAN, but enterprise systems will always be dominated by Unix.

Agree. But I don't think severs are what we are talking about.

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

I noticed it was a little slow today but nothing like it has been in the past.

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

If you want the 2d vector to contains either strings or ints, then maybe you need to create a template class.

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

Look at line 42 as stated in the error message (line 32 of your post). Multi-line if statements have to be enclosed in { and } braces

if( something )
{
   // blabla
}
else
{
   // blabla
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Post some of the compiler error messages.


>>void main()

NEVER EVER use void main() Here's why

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

There are options in VC++ to produce several kinds of assembly code from the C or C++ code. I don't use NetBeans but I would imagine it has an option too.

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

My guess is that you are using the wrong sql statement. If you are using Oracle then you need to read this article and sample program.

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

Read your textbook about how to write a c++ class. There are also millions of tutorials on the web you can read. Don't be so lazy and do a little research and reading.

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

1) Create another loop

int main()
{
    while( true )
    {
          // blabla
    }
}

2) I don't know what you mean by "clear last text". If you mean clear the screen, don't bother. Just print a couple blank lines and reprint the menu.

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

Just as I suspected -- you can not include those two *.cpp files in main.cpp. Delete lines 2 and 3, then add function prototypes for each of those two functions.

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

post the entire main.cpp.

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

After line 12 or the code you originally posted, create a switch statement and call either BFP() or BMI().

switch( pnum )
{
    case 1:
          BFP();
          break;
    case 2:
          BMI();
          break;
    default:
         cout << "Huh??\n";
         break;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

SaveFileDialog() doesn't save anything -- it's just a dialog box that lets you nagivate to the folder where you want the file saved and give the file a name. After SaveFileDialog() returns to your program your program must get the complete path/filename from the SaveFileDialog class, open the file for writing, and write the data.

Here is an example written for C#, but C++ is probably similar if not identical.

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

Oh so you don't think *nix is not just a bunch of hacked together programs??? After I installed Ubuntu and Fedora 11 they both went to their respective web sites and downloaded updates. Even after that I couldn't get the sound to work right, but I found a tutorial that explained how to uninstall something (I forget what) then download something else. It was quite a lengthy tutorial -- but worked. Even after all that I still can not play movies that are on DVD, I understand that's because the drivers are not installed with the os.

I have Windows 7 Home Prem and everything worked perfectly after installing the os. Perfect sound, plays both blue-ray and normal DVD movies, youtube videos (with sound ;)

Now tell me who has the hacked operating system.:P

lllllIllIlllI commented: Hello new best friend :P +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

thanks

Please ask more questions if you are still having problems with this -- someone is likely to answer them.

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

You can't call *.cpp files, but methods and functions that reside in the files. If you want to call IBM.cpp then call one of the functions or methods that is coded in that file.

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

We don't have the definition of your queue class so can't really tell if some of those are right or wrong.

2. Probably wrong. You are not supposed to delete the item from the queue. Just retrieve it. There is probably another way to get the item out of the queue without deleting it.

3. Definitely wrong. Just think a minute about what you have done with those loops. You first initialize variable i to be q.front() and then test to see if i is less and q.front() ??? Most likely should be this? for(int i = q.front(); i < q.back(); i++) What I don't know if what kind of data is in the queue. Is it a queue of strings (most likely answer considering the question), a queue of ints or what??

4. Similar answer as given for #2, above.

5 & 6. I have no idea since I don't know the definition of the queue class.

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

or [quote=mono] blabla [/quote]

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

Step 1: Create a console project. File --> New --> Project. Project types: select Win32. Templates: select "Win32 Console Application". Near the bottom of the screen enter a project name and location. Then press Ok button.

Step 2: On this window just click Next

Step 3: Application Settings window: Uncheck the Precompiled Headers setting. That is very useful for complex programs with lots of files, but not for simple programs. Click Finish button.

Step 4: You will see a starter _tmain() function. I would just delete that code. You will also want to change the project settings so that the compiler does not attempt to compile for UNICODE. To do that, select Project --> <project> Properties (at the bottom of the menu), expand the Configuration Properties menu, select General. On the right side of the screen change "Character Set" to "Not Set".

Step 5: copy the two *.cpp and *.h files into the project folder so that they can be used in the project. This step would have been unnecessary had you created the project when you first started.

Now you are ready to add your files to the project.
In Solution Explorer (left side of the screen) right-click the folder named "Source Files". A drop-down men appears, and you want to select the very first one that says "Add". That will give you another popup menu, and select the second menu item that says "Existing Item". This will give you a dialog box where you can select the …

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

This is a very simple programming problem which can be done with only 8 lines of code! All you have to do is create an array of 255 ints then use each letter of the string as an index into the array. So if you have 'A' then all you have to do is increment counts. Yes, you do not really need all 255 array elements, but it makes the program a lot more efficient if you use it.

The instructions say you only count the number of alphabetical characters -- 'A'-'Z' and 'a'-'z'. The macro isalpha will help you do that

// assuming a variable named string
if( isalpha(string[i]) ) 
   // increment the counter
   counts[string[i]]++;

Finally, to print out the results, just loop through the array and for those values greater than 0 print the value of the loop counter cast as char, and the value of the counters array.

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

Since its no longer possible to use code tags without line numbers, suggest you change quote tags to retain spaces and tabs like code tags. I'm a little surprised that was not how quote tags should have worked anyway.

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

the output you posted is wrong. Here is the correct output. Had you bothered to compile and run that program you would have seen it too.

The contents of the array are :
        1       5       0
        2       4       -2
        3       3       0
        4       2       2
        5       1       4
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I would use a typedef

#ifdef SIZE_32
   typedef __int32 inttype;
#else
   typedef __int64 inttype;
#endif

int main()
{
    inttype a = 0;
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Suggestion: Create a web site using MySQL database that stores member information.