49,767 Topics

Member Avatar for
Member Avatar for Sarkurd

Hi I have tried to implement Linked-List data structure and i was folowing a guide but i have an `error` in line 12 in `contactlist.h` I have included `contact.h` properly but still not working :-/ contact.h #ifndef CONTACT_H #define CONTACT_H #include <iostream> #include <string> #include "contactlist.h" class Contact { private: …

0
101
Member Avatar for cambalinho

i continue with problems for use a callback function in a class member :( class Timer { private: typedef std::function<void(void)> timerprocedure; timerprocedure tmrprocedure;//can't be static int MilliSecondsTimer; bool blnDestroyed; UINT TimerId; HANDLE Timer1; static void CALLBACK MyTimerProc( HWND hwnd, UINT message, UINT idTimer, DWORD dwTime) { tmrprocedure();//call the lambda timer …

Member Avatar for Banfa
0
497
Member Avatar for Joshua_9

how would i make a program that outputs this: amount of vairiables: 3 3123 1412 2412 mean: 1414 standard viariance: 4344

Member Avatar for David W
0
540
Member Avatar for MandrewP

Is double pre-incrementing undefined behavior? Like ++++x or even ++++++++x. I think it must be since it all occurs between sequence points. But what could possibly go wrong? Or do you just not ask that question and automatically stay away from any undefined operations? Is double incrementing ever routinely used? …

Member Avatar for shahid_650
0
202
Member Avatar for bernardo.mclobo

Hi. I'm learning by myself data structures with c++ but i got stuck Here's my code: #include<iostream> #include<cstring> #include<string> #include<sstream> using namespace std; template<class T> // node class class nodeType { public: nodeType(); nodeType(T); ~nodeType(); nodeType *next; nodeType *previous; T data; //string getkey(); string Id; //void borra_todo(); void imprime(); // …

Member Avatar for tinstaafl
0
246
Member Avatar for mary ann_1
Member Avatar for Schol-R-LEA
0
718
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
346
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
363
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
202
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
272
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
464
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
257
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
122
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
470
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
102
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
183
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
185
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
153
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
110
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
384
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
363
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
192
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
681

The End.