- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
7 Posted Topics
This issue is due to variable "s" in class. Which is not initialized. Please check the operator int also.
You can calculate the result using AP (Arithmetic Progression formula). Take small number say x. SumX = (x*(x+1)) / 2; Now take bigger number say y. SumY = (y*(y+1)) / 2; Now Subtract Result = SumY - SumX; No need of any array. -Dhiraj
You can change the order of try and for. [CODE] for (counter = 0; counter < (tblAllEntries.Rows.Count); counter++) { try { TotalExpense += Convert.ToInt32(tblAllEntries.Rows[counter].Cells[2].Value); } catch (InvalidCastException a) { TotalExpense += 0; } } [/CODE]
I am not sure about my solution but I can give you one direction to look for. Actually I tried earlier but I was not able complete that. You can check any web services offered by google gmail. If web-service is available then you can generate c++ code using gsoap …
[code]#include <iostream> #include <fstream> using namespace std; int main(int argc, char* argv[]) { ifstream file; string folderPath("C:\\"); string fileName("boot1.ini"); string filePath(folderPath); filePath += fileName; file.open(filePath.c_str()); if (file.is_open()) { cout << "File is present"; } else { cout << "File is not present"; } file.close(); return 0; }[/code] This program may …
Logic of above program is not correct. In posted program while loop is not correct value of variable c is not known, and after for loop c will contain last value of string. It should be like this. bool isValidPin = false; while(!isValidPin) { isValidPin = true; cout << "Enter …
The End.
dgirdhar