49,761 Topics
| |
I am getting following error, while passing a C++ string variable to SQL insert command: error C2679: binary '+' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion) Below is the code: int main() { int empid = 12; int phone … | |
Good morning. I would like to ask for help on our FINALS PROJECT. Our professors told us that he have given us everything we need but we don't have any idea. The requirements are : A.Adding of Records. -User should be allowed to enter a maximum of 15 record. -However, … | |
I have made a Biginteger class that performs multiplication operation according to Karatsuba's algorithm. But it seems that the code is not working perfectly.In the class I have made a function named karatsuba(BigInteger a1, BigInteger b1)that performs the Multilplication operation. There might be problems in this function as I have … | |
[Click Here](http://s27.postimg.org/syqganxir/New_Bitmap_Image.png) "Having a container of pointers raises the question of how to destroy it. If you simply "do the right thing" and define a FilmList destructor that visits each of its pointers and deletes it, you must then worry about client code that contains a function with a FilmList … | |
I am using Xcode to do c++ programming and I have a c++ code, with different input arguments. I want to achieve that in Xcode, I could run multiple simultaneous running of my c++ code. However, the current problem is that once one code finishes, its terminal window automatically closed … | |
tel me the difference between binary and unary operator | |
Greetings programming community, How can I get this recursive function that finds the average of an array from any range using specific parameters to work? The parameters are (int a[], int x, int y). The x parameter means begin at and the y means end at. int k; //no global … | |
Is there a function to remove spaces from a string? I need a way to have a user input a string with spaces, numbers, and letters and remove all spaces before storing it. Using scanf, cin, gets or fgets, apparently I only retain whatever is before the first space. | |
I want to implement an algorithm in c++ using two concurrent infinite loop: the first infinite loop produces the upper bound on each iteration and the other infinite loop produces lower bound on each iteration. Both loops would terminate only when the the upper bound and lower bound meets. What's … | |
#include <iostream> #include <string> /*i want to compare string and char as char is a subset of string*/ string S [50]; //algorithm is somewhat like: i=0; while(i<23){ char c = (char) i; S[i] = c; } for(i=23;i<50;i++){ S[i]="hello"; } //i want to check how many hello are there i=0; x=0; … | |
The following is a part of a hailstone cpp program. I want to write an option to let users enter 2 numbers and the program evaluates the longest sequence the number has within the 2-number range and return the count. I have been struggling it for hours :P but the … | |
c++ program that will convert between function kilogram to convert pounds to kilogram, a function celsius to convert temprature in dgrees fahrenheit to degrees celsius, A function fahrenhiet to convert temperature in degrees celsius to degrees fahrengeit. [Click Here](null) | |
Question1. Your task is to complete the program provided by providing the three missing classes, Minus, Times and Divide. Next, you should extend the program so that it supports relational, logical and conditional expression operators as defined by the following extension to the grammar: <exp> -> '(' <operand> <op> <operand> … | |
| Anyone knowledge with reading binary file intro struct? I got weird error.. The first line is correct but then its only trash.. http://s14.directupload.net/images/141003/nz6k6cd2.jpg it starts 1,0,450 and then it should be 2,450,1200 3,1200,xxx and so on. Load file function: bool CNtlFileSerializer::LoadFile(char* pszFullPathFileName, bool bCrypt /* = FALSE */, char* szCryptPassword … |
HI and good day to all, Since my 2nd year of my uni life, i have hardly touch C++ programming especially OOP in C++.Now starts my revision on C++ OOP. Since I have forgotten many OOP knowledge there is a question I wish to ask. Below is my code. #include … | |
I already tried to seek some tutorials in youtube but found nothing but b-tree only and no b*tree articles. Please guys I really need your help :( | |
can someone give me a detailed explaination why this won't compile, thanks` #include <iostream> using namespace std; int main () { int num1 = 5, num2 = 10; if (num1 < num2) { cout<<”num1 is less than num2”; else cout<<”num1 is not less than num2”; } return 0; } | |
Solutions to quadratic equation Ax^2 +Bx+C=0 All solutions must be calculated in visual studio including the imaginary parts and using if statement | |
Hi all,have this code: Hi all,have this code: How do i implement binary search to display item.. found at index.. #include "stdafx.h" #include<fstream> #include<iostream> #include<string> #include<iomanip> using namespace std; struct sDetails{ int kNum; string Name; }; int _tmain(int argc, _TCHAR* argv[]) { sDetails students[5]; ifstream infile; infile.open("student.txt"); for (int i … | |
hi, my name is Ben,am new to c++ and i have this assignment to do.am stuck please somebody help me out Frequency of letter pairs Write a program to count the occurrences of all letter pairs in a sample of text (like the first paragraph of the Constitution). Disregard differences … | |
Im building a banking system. in my create_account it asks for account address and phone number as well as other questions. When I go to my Show account info (balance inquiry) I notice its not getting the right address as well as phone number. its showing "garbage". Im not sure … | |
I have built Boost from the website using ./bootstrap.sh ./b2 install [IMG]http://i.stack.imgur.com/VDrHd.jpg[/IMG] [IMG]http://i.stack.imgur.com/ZaBfk.jpg[/IMG] I think all are installed properly. I am trying to use Xcode to include the library of boost:thread.My code links to the header file properly with " #include "boost/thread.hpp"" commented, as seen from the following: [IMG]http://i.stack.imgur.com/XW1qE.jpg[/IMG] However, … | |
Hello guys, I've wrote a symbol table creator that uses hash function to determine the position of the symbol in the table and a linked list approach for the storing process in the table. And to the point. I've known myself for doing easy problems the hard way(and my teachers … | |
So i've decided to use SFML and i'm just trying to figure out its advantages and disadvantages...I've looked around and this is what i've got so far. Advantages: * Cross Platform * OO Design * Simple and fast (subjective) Disadvantages: * Quite new Any additional thoughts will again appreciated | |
I have written a code that asks the user a name (ex.candy) and a number then it stores it in a stuff.txt file like so: " candy 20 candy 40 decorations 70 costumes 40 candy 60 " When reading from that stuff.txt file, how can I add the running total … | |
I've been reading 'Learn C++ By making Games' and it uses the SDL library. The problem is the book has poor code examples, a lot of them don't even show the #include <libraries> instead jump straight to the main() function. So I just ordered the book 'Linux Graphics Programming with … | |
Today, I faced very weird problem. I have 2 classes say class A and B. Both have one .h and .cpp files. 4 files(A.cpp,B.cpp,A.h,B.h). A class is base class of B and we are using instance of B in class A. It was saying "not a type" error while compiling. … | |
i'm very confused and the others forums make me more confused :( i'm using string, so i need convert string to WCHAR*: const size_t len = filename.length() + 1; wchar_t wcstring[len]; swprintf(wcstring, len, L"%s", filename.c_str()); Gdiplus::Image img2(wcstring); the img2 read the file normaly, but i'm creating another Image variable in … | |
: This is my program and its not compling empId numbers, can you tell me whats wrong? | |
Hi,i used this example for practicing,supposed to be easy one,but,abit confusing. Can you help to solve and point to mistakes i've done. Postman Pat became bored one night at the postal sorting office and to break the monotony of the nightshift, he carried out the following experiment with a row … |
The End.