49,757 Topics
| |
I have an Excel file with M columns (A, B, ..., M) that i need to open to extract it's contents using a visual c++ program. Does anyone know how to do it? The last row of the file is line 423 (first row contains the headers of each column). … | |
For example, when searching string_1 in MySQL table found NO RESULT, then want to add string_1 into database table. Using code below: while (res->next()) cout<<"This word means "<<res->getString(2); if (res==0)/[U]/I use this if statement , but don’t work![/U] { cout<<"Would you like to add this word to database?"<<endl; } What … | |
[CODE]#include <iostream> using namespace std; int main() { char flip; int coin, flipnum, flipint, count, evod; string you, enemy; int hityou, hitenemy, youhealth, enemyhealth; srand(time(0)); //makes rand work cout<<"CHOOSE YOUR MANBEAST: "; //Choose a fighter getline(cin,you); youhealth = rand() % 15 + 95; //Your fighter's health cout<<endl<<endl<<"WHO SHALL CHALLENGE HIM?: … | |
Hello all, I'm working with exponentiation and I have an assignment to write a code for loop initialization and loop body but unfortunately, I don't even know what that means. I was given the following information: Input x // can be any float Input y // has to be a … | |
Hello. I'm pretty new to debugging with visual c++. I've tried reading some tutorials but none of them seem to cover what my program is doing. i enter the command arguements for my code which is the file ./input.txt. I then get the following error. [code] 1>c:\documents and settings\jennifer\my documents\visual … | |
Hello,all! I am attempting to make a program in which tetris music is played. However, to get the full effect, I need more than one beep at a time. I cannot use the getsound thing either, i am not allowed. It has to be using 'Beep()'. Is this possible, and, … | |
//Stephen Igbinedion //CMPS 1043 //November 10 //This program plays multiple games of Simple Simon Bridge #include <iostream> #include <iomanip> #include <fstream> #include <string> using namespace std; ifstream infile; ofstream outfile; void Hand(char c1,char c2,char c3,char c4,char c5); int winner(int R_bid, int W_bid,int I_bid); int main() { int optimus; char gameplayer, … | |
I think I'm having an issue with my use/understanding of vectors in C++. Any advice would be greatly appreciated! I'm trying to use a vector of vectors of floats to store data coming from an input file. I know that, at most, a line of floats will have 14 elements. … | |
Hi, Can someone suggest how we can get the mac address of the router in c++. Thanks, Arun. | |
I got a program that works OK, but now I need to adapt it to macedonian and I don't have a clue how to make it work... Am I suppose to include some encoder of some sort?? | |
[CODE]#include <iostream> #include <sstream> #include <fstream> #include <string> #include "Python.h" using namespace std; #define tP PyRun_SimpleString(pyCom.c_str()) double func(double x); int main() { //file to write numbers to ofstream file; file.open("numCache.txt"); //string for int to string conversion string temp; stringstream output; //string that is read from console string numCache; //returned number … | |
Hi, Does anyone know how i could get a list of all files in a given directory given the directory's path using c++? | |
Hey there, wonder if you can help me.. I have three classes: 1. Person 2. Accounts 3. Purchases (Accounts and Purchases both inherit from Person) You don't need an account to make a purchase but if you do you'll enter your: name, address etc.. The problem I'm having is association. … | |
I don't know if this is the right board for this but here goes I have finsihed writing my program and it compiles fine on windows using the MinGW compiler. Ihave it compiling and running fine I tried compiling on a linux machine to create an executable but i an … | |
i need to write a C++ or Java program that will receive as input an IP Address in decimal format 192.168.2.125 The program will identify and print the class of that IP according to the first octet. Then it will perform binary bitwise AND operation between the IP address and … | |
If I have the following setup: [code] Point* MyPoint = Object->GetMyPoint(); if(MyPoint->GetValue() != 2) do something; else do something else; [/code] If MyPoint is NULL or invalid, the MyPoint->GetValue() will cause a segfault. This should fix it: [code] Point* MyPoint = Object->GetMyPoint(); if(MyPoint) { if(MyPoint->GetValue() != 2) do A; else … | |
I tried to print all the possible combination of members of several vectors. Why the function below doesn't return the string as I expected? [CODE=c] #include <iostream> #include <vector> #include <fstream> #include <sstream> using namespace std; string EnumAll(const vector<vector<string> > &allVecs, size_t vecIndex, string strSoFar) { string ResultString; if (vecIndex … | |
Pls help me out i am using visual C++6.0 enterprise edition.... [code=c++] /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ // Source file originally created by PegWindowBuilder // // // Class Name: ecgclass // // Notes: /*--------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------*/ /* WB Auto-Generated Start (1) */ #include "peg.hpp" #include "ecg_res.hpp" #include "ecgone.hpp" extern PegResourceTable Default_Theme_ResourceTable; /* WB Auto-Generated … | |
hi i want 2 know ho to make Instant Messenger client with c++. pls. provide web resources if available.., .. pls.. | |
hi :) I wrote a program that will determine the name of the card by simply enter the code notation.. For example if the user enter 'Q S',the program will display queen of spades... I using two variable with the type string to allow the data entered which is note1 … | |
i try to send the data to printer using comm port. I can open the port, but the printer still no response. I'm confuse why the system display No data (refer printf("\nNo data!\n"). Pls help me.. | |
how randomise function works in c++ and how can output of the program be found when program contains randmize() function. | |
Hi, I'm a beginner to C++. I'm writing a linked list template but I get this error: 1>Tester.obj : error LNK2019: unresolved external symbol "public: __thiscall List<int>::~List<int>(void)" (??1?$List@H@@QAE@XZ) referenced in function _main 1>Tester.obj : error LNK2019: unresolved external symbol "public: __thiscall List<int>::List<int>(void)" (??0?$List@H@@QAE@XZ) referenced in function _main I'm using Visual … | |
Figure I might as well go ahead and clear up that this is obviously a school assignment. I have completed a somewhat decent amount of code (not saying I have a lot of faith in it's correctness tho) and need assistance to figure the rest out. I'm at a complete … | |
[CODE]void menu() { int userinput; static value *head = NULL; static value *tail = NULL; cout << "1 - Insert value" << endl; cout << "2 - Print list" << endl; cout << "3 - Delete value" << endl; cout << "4 - Quit" << endl; cout << "5 - … | |
Hello! I'm getting this infamous problem: [B]Segmentation fault (core dumped)[/B]. Not sure what's going on. ='( Please help! I've red-ed and bolded the parts that I think are problems. In the following class, I'm trying to create a class called 'BucketHashTable'. I want to create an array of known size … | |
Hey, so I have to make a program that has to multiply two 3x3 matrices (among other things). I used classes to do the project, but I just can't seem to get this multiplication to work. Here is my code so far: [code]void matrix::mult(const matrix& u) { double c[9]; double … | |
I am very new to C++ and have the slightest idea where to start. Here are the directions for the project I'm doing. Below is a copy of the program that I have so far. An internet service provider has three different subscription packages for its customers: Package A: For … | |
Hello, please help me I am trying to write program that allows a user to enter 10 numbers, stores in an array and then displays each with it's square (no * no) and cube (no * no * no), I am able to get square but cube in not working, … | |
I'm making a header file to make, sort, and print a vector using heapsort. I keep getting a compiler error about my const char[100] array. Probably something really simple I'm missing...I hope. In function `void build_list(std::vector<T, std::allocator<_CharT> >&, const char*)': 16 expected primary-expression before "const" 16 expected `;' before "const" … |
The End.