1,174 Posted Topics

Member Avatar for mrjoli021

To have your code in e.g. a static library, create a new win32 static library solution. Add your files to the solution and compile. Now you have a .lib that you can ship along with your header file(s) for others to use. See Visual Studio's help on how to take …

Member Avatar for mitrmkar
0
114
Member Avatar for rsk8332
Member Avatar for orangejuice2005

Very shortly about the & operator, it is the bitwise and operator. See e.g. here [url]http://www.learncpp.com/cpp-tutorial/38-bitwise-operators/[/url] for details.

Member Avatar for Lerner
0
1K
Member Avatar for unclepauly

Your catch statement in FuncB() is not setup to catch the specific exception that gets thrown from DoSomethingElse(), but the catch statement in FuncA() is.

Member Avatar for vijayan121
0
112
Member Avatar for cbattagler
Member Avatar for cbattagler
0
106
Member Avatar for kux

It may prove helpful if you post the error messages that you are receiving.

Member Avatar for mitrmkar
0
82
Member Avatar for arby11886

Here is one solution for your compareTo() function [code] int compareTo(const Record& r) const //2nd const wont change member variables { // first compare last names int result = strcmp(lname, r.lname); if(0 != result) { // last names differ return result; } // then compare first names result = strcmp(fname, …

Member Avatar for mitrmkar
0
182
Member Avatar for komal.Sam

STL provides you with the reverse() algorithm. I.e. [code]std::reverse(your_vector.begin(), your_vector.end());[/code] You need to #include <algorithm> to make it compile.

Member Avatar for mitrmkar
0
60
Member Avatar for Phlip

You can download dependency walker application from: [url]http://www.dependencywalker.com/[/url] Open your application in the dependency walker on your friends computer, that way you will see all the files that should be available but are not. You may have to install some redistribution package on your friends computer.

Member Avatar for Nick Evan
0
152
Member Avatar for Jiko980
Member Avatar for Jiko980
0
134
Member Avatar for Techboy1523

Hmm .. shouldn't that first loop be something like [code] for ( int KPH = 50; KPH <= 130 ; KPH +=5) cout << setw (5) << KPH << "\t\t" << /* --- KPH converted to MPH here --- */ << setw(5) << endl; [/code]

Member Avatar for Techboy1523
0
649
Member Avatar for cosmos22

>> Do have any idea about how you'd format a drive, without prompt Seriously, you must be kidding now asking for a thing like that ...

Member Avatar for mitrmkar
0
76
Member Avatar for Nyx18

To get rid of the compiler errors, first remove the items in [COLOR="Red"]red[/COLOR] [code] void sort(Student stu[], int parameter, int count) { <snip> for (int i = 0; i< count-1; i++) { [COLOR="Red"][79][/COLOR] if(Student[i].compareTo(Student[i+1], parameter) == true) [COLOR="Red"][80] [/COLOR] { <snip> } } } [/code] and then change the [code] …

Member Avatar for mitrmkar
0
116
Member Avatar for cosmos22

Try this one, it displays four different styles messages, maybe you get the idea of how message boxes work. The last one prompts you with a question. [code] #include <windows.h> int main(int argc, char* argv[]) { MessageBox(NULL, "Serious error", "<Message title here>", MB_ICONSTOP|MB_SETFOREGROUND); MessageBox(NULL, "Warning", "<Message title here>", MB_ICONEXCLAMATION|MB_SETFOREGROUND); MessageBox(NULL, …

Member Avatar for mitrmkar
0
191
Member Avatar for PaKmAn

You don't see the name because the code does not output it anywhere, you must add [CODE]cout << name;[/CODE] at a proper location.

Member Avatar for PaKmAn
0
140
Member Avatar for cosmos22

First of all, you have there two 'main' functions, one for a windows graphical interface application and one for a console application. You only can have one of them, not both. I think you can remove the WinMain() function altogether and use just the 'int main()'. Actually the main function …

Member Avatar for cosmos22
0
186
Member Avatar for cosmos22

<< Given the file example name of "dafile". Here the name is [B]dafile[/B] << system("del dafile.txt"); And here the name is [B]dafile.[COLOR="Red"]txt[/COLOR][/B] Do you have a file named 'dafile' on your desktop and you are trying to delete 'dafile.txt', which does not exist?

Member Avatar for Ancient Dragon
0
110
Member Avatar for gallantmon1

A minor note ... I think that actually if(doc==EOF)break; is OK since the compiler is to promote the char to int for the comparison.

Member Avatar for Aia
0
119
Member Avatar for number87

All the for loops use an upper limit of 100 but you only have 20 elements in intNum.RatNo[], that's why it fails.

Member Avatar for mitrmkar
0
169
Member Avatar for curt1203

[CODE] float CelsiustoFahrenheit(int) { // // This fails because you are dividing using two integers here, // // result = ((9/5)*temperatureC)+32; // // use the following instead // result = ((9/5[B].0[/B])*temperatureC)+32; return result; } [/CODE] You might want to run the following snippet to see the difference [CODE] cout << …

Member Avatar for curt1203
0
250
Member Avatar for sonygamer

Hi, I quickly changed the code so that it should do what you intented. [code=c++] #include <iostream> #include <cmath> using namespace std; int calcRval(int,int,int); // the input to colCode() is now a char int colCode(char); // these variables are not needed // int c1,c2,c3,val; int main() { char c1,c2,c3; cout<<"input …

Member Avatar for Arpy Giri
0
295
Member Avatar for abidbhat

Hi, How about just forgetting the Get/SetWindowxxx functions and use something like ... SendMessage(edit_control, WM_CHAR, achar, 0);

Member Avatar for vijayan121
0
83
Member Avatar for hyperzero4

[QUOTE=hyperzero4;536523] Everything seems to be going okay... except for the last part when I'm trying to get the word_appearances to count how many of the search words are in the poem written inside script.txt. [/QUOTE] You need only two for() loops to iterate over the strings i.e. something like below. …

Member Avatar for John A
0
4K
Member Avatar for Prahaai

[QUOTE=Prahaai;536437] I don't understand how this program acts as a COM application, that's the problem. [/QUOTE] Well, you tried to run it as a .COM but you did not compile it first. Any file with the extension .com is a candidate to be run as a program under windows. Windows …

Member Avatar for mitrmkar
0
104

The End.