49,761 Topics

Member Avatar for
Member Avatar for Sunil_12

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 …

Member Avatar for Sunil_12
0
1K
Member Avatar for lian_1

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

Member Avatar for deceptikon
-1
105
Member Avatar for SK1994

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 …

Member Avatar for tinstaafl
0
342
Member Avatar for Vasthor

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

Member Avatar for mike_2000_17
0
351
Member Avatar for cannon_1

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 …

0
84
Member Avatar for thilinam
Member Avatar for Singularity83

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 …

Member Avatar for Singularity83
0
197
Member Avatar for veronicak5678

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.

Member Avatar for bridgett.grace
0
2K
Member Avatar for cannon_1

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 …

Member Avatar for cannon_1
0
268
Member Avatar for Vivek_12

#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; …

Member Avatar for Vivek_12
0
462
Member Avatar for iikitty

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 …

Member Avatar for Moschops
0
255
Member Avatar for Tavershima

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)

Member Avatar for David W
0
120
Member Avatar for Avdhesh_1

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

Member Avatar for rubberman
-1
438
Member Avatar for Silfro

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 …

0
101
Member Avatar for vergil1983

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 …

Member Avatar for vergil1983
0
181
Member Avatar for hurtmemore

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 :(

Member Avatar for JasonHippy
0
119
Member Avatar for yeyo_1

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; }

Member Avatar for yeyo_1
0
183
Member Avatar for Nana_29

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

Member Avatar for NathanOliver
-1
179
Member Avatar for aluhnev

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 …

Member Avatar for tinstaafl
0
151
Member Avatar for bensila4

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 …

Member Avatar for tinstaafl
0
103
Member Avatar for Vincent_5

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 …

Member Avatar for tinstaafl
0
381
Member Avatar for cannon_1

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

Member Avatar for mike_2000_17
0
358
Member Avatar for BMutev

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 …

Member Avatar for NathanOliver
0
189
Member Avatar for Tycellent

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

Member Avatar for Sarkurd
0
672
Member Avatar for Jinxx

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 …

Member Avatar for tinstaafl
0
806
Member Avatar for lewashby

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 …

Member Avatar for lewashby
0
692
Member Avatar for nitin1

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

Member Avatar for NathanOliver
0
332
Member Avatar for cambalinho

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 …

Member Avatar for JasonHippy
0
428
Member Avatar for Cowboys1

: This is my program and its not compling empId numbers, can you tell me whats wrong?

Member Avatar for Lerner
0
94
Member Avatar for aluhnev

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 …

Member Avatar for Lerner
0
721

The End.