49,757 Topics

Member Avatar for
Member Avatar for Tales

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). …

Member Avatar for Ancient Dragon
-1
86
Member Avatar for kent01981

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 …

Member Avatar for Ancient Dragon
0
113
Member Avatar for Ecanto

[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?: …

Member Avatar for restrictment
0
219
Member Avatar for confusedndazed

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 …

Member Avatar for confusedndazed
0
82
Member Avatar for evilsithgirl

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 …

Member Avatar for JasonHippy
0
136
Member Avatar for orangejediman

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, …

Member Avatar for mrnutty
0
96
Member Avatar for Stivdion

//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, …

Member Avatar for mrnutty
0
81
Member Avatar for jmoran19

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. …

Member Avatar for mrnutty
0
125
Member Avatar for arunperi

Hi, Can someone suggest how we can get the mac address of the router in c++. Thanks, Arun.

0
60
Member Avatar for GregoryHouseMD

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??

0
58
Member Avatar for ebrutekim

[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 …

0
107
Member Avatar for crazybitez

Hi, Does anyone know how i could get a list of all files in a given directory given the directory's path using c++?

Member Avatar for Ashishinani1756
0
242
Member Avatar for Phil++

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. …

Member Avatar for VernonDozier
0
111
Member Avatar for AdRock

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 …

Member Avatar for AdRock
0
174
Member Avatar for sameh_ba

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 …

Member Avatar for sameh_ba
0
146
Member Avatar for daviddoria

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 …

Member Avatar for JasonHippy
0
118
Member Avatar for gundalav

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 …

Member Avatar for Sodabread
0
203
Member Avatar for kiranpreddy05

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 …

Member Avatar for Fbody
0
230
Member Avatar for debasishgang7

hi i want 2 know ho to make Instant Messenger client with c++. pls. provide web resources if available.., .. pls..

Member Avatar for kabeer.khan
0
2K
Member Avatar for samsons17

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 …

Member Avatar for pecet
0
95
Member Avatar for msofian3

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..

0
68
Member Avatar for aarpitgenius

how randomise function works in c++ and how can output of the program be found when program contains randmize() function.

Member Avatar for samsons17
0
88
Member Avatar for liemonline

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 …

Member Avatar for jonsca
0
1K
Member Avatar for Ryujin89

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 …

Member Avatar for Ryujin89
1
190
Member Avatar for adelphe

[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 - …

Member Avatar for abhi_elementx
0
108
Member Avatar for crystality

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 …

Member Avatar for abhi_elementx
0
225
Member Avatar for uncbball

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 …

Member Avatar for abhi_elementx
0
149
Member Avatar for vinochick

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 …

Member Avatar for jonsca
0
760
Member Avatar for maverick405

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, …

Member Avatar for abhi_elementx
0
2K
Member Avatar for railmaster7

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" …

Member Avatar for Dave Sinkula
0
202

The End.