Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
78% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
3
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #2K
~20.2K People Reached
Favorite Forums
Favorite Tags

20 Posted Topics

Member Avatar for iblanq

If I understand you, console (output window) will close when C++ program ends in Visual Studio. There are many ways to prevent it from doing that here are 2 basic ones. Add one of those 2 lines at the end of your program just above return 0; int x; cin …

Member Avatar for Ancient Dragon
0
320
Member Avatar for Kristian_2

I have solved it... Shame... -------------------------------- I have problem with this code: cin >> str; smatch m; regex e("([[:w:]]+)@([[:w:]]+)\.com"); //<- Here was the error (it was regex e("([[:w:]+)@([[:w:]]+)\.com");) silly me :(( bool found = regex_search(str, m, e); cout << "m.size() " << m.size() << endl; for (int n = 0; …

0
149
Member Avatar for Kristian_2

Hi guys, I have small problem with my example code. Any hint? #include <iostream> using namespace std; class A{ public: int a; A(int i){a = i;} A(const A& rhs) // copy constructor { a = 2; } A(const A&& rhs) // move constructor { a = 3; } }; void …

Member Avatar for mike_2000_17
0
429
Member Avatar for moaz.amin.37

Here you go few examples of using static members: #include <iostream> using namespace std; class MyClass{ static int counter; public: void print(int& i){ cout << "Number of instances: " << counter << endl; } MyClass(){ print(++counter); } ~MyClass(){ print(--counter); } }; int MyClass::counter = 0; // Static member initialization int …

Member Avatar for deceptikon
0
849
Member Avatar for moaz.amin.37

I did, and I got -1 reputation or whatever on that post. So thanks for that as well. http://www.daniweb.com/software-development/cpp/threads/476648/static-data-member-function#post2082150

Member Avatar for Kristian_2
0
890
Member Avatar for eathan16

May I ask why turbo C++? You can create such tool in Visual Studio using C# in less than 2 hours... If you know even a little of C++, C# will be piece of cake in this case.

Member Avatar for eathan16
0
223
Member Avatar for rico.j.rico.3

Create file. http://www.cplusplus.com/reference/fstream/fstream/fstream/ Write. http://www.cplusplus.com/reference/ostream/ostream/operator%3C%3C/ And finally click on first link. http://lmgtfy.com/?q=how+to+write+into+file+C%2B%2B

Member Avatar for ishaan3731
0
252
Member Avatar for TheFearful

You can hide node constructor body withing tree.cpp file as well. Accessor functions could be const. int Key() const { return key; }; Node* Left() const { return left; }; Node* Right() const { return right; }; void setKey(int aKey) could be void setKey(const int& aKey). Same with 2 addNode …

Member Avatar for Kristian_2
0
205
Member Avatar for shurooqalhodar
Re: help

Well, I think that your due date expired. > Due date: 30/March/2014, 23:55 pm (through Moodle)

Member Avatar for Kristian_2
0
105
Member Avatar for syasya

If I understand you corectly this should work. #include <iostream> using namespace std; void BubbleSort(int *array, int from, int size, bool decreasing){ bool bDone = false; while (!bDone) { bDone = true; for (int i = from; i != size - 1; ++i) { if (decreasing){ if ( array[i] > …

Member Avatar for Kristian_2
0
14K
Member Avatar for DS9596

Char "is a simbol" found in ASCII code. If you write your program like this: char c = 'A'; int i = c; cout << c << ", " << cout << i; On the screen you will see: **A, 65** This is called implicit type conversion. All characters can …

Member Avatar for Ancient Dragon
0
426
Member Avatar for SW-ENG mohamed

Here you go. #include <iostream> using namespace std; string printA(int n){ string s = ""; for(int i = 0; i<n; i++) s += " "; return s; } string printB(int n){ string s = "* "; for(int i = 0; i<n; i++) s += "* "; return s; } int …

Member Avatar for Kristian_2
0
169
Member Avatar for Afaf

How about you write the code, or at least part of it, and then we help you fixs bugs, give you tips, critics and suggestions?

Member Avatar for iamthwee
0
233
Member Avatar for dennis.ritchie

Why post above mine get -1 vote. It's perfectly fine solution. int a = 10; int b = 20; a = a+b; b = a-b; a = a-b; // or same with -> b=a+b-(a=b) cout << a << endl; cout << b << endl; print out: 20 10

Member Avatar for Kristian_2
0
231
Member Avatar for Elharts

Try this #include<iostream> #include<cmath> #include<iomanip> using namespace std; int main() { double leibniz = 0.0; // pi value calculated from Leibniz double eulerall = 0.0; // pi value calculated from Euler (all integers) double eulerodd = 0.0; // value calculated from Euler (odds) double counter = 0.0; // starting value …

Member Avatar for Kristian_2
0
245
Member Avatar for kal_crazy

> src.substr (0, src.find_last_of ("\\") + 1); What does 0 represent? Starting position? Yes. http://www.cplusplus.com/reference/string/string/substr/

Member Avatar for Kristian_2
0
216
Member Avatar for kumarprashant

You could use classes to handle contact data. Also you could use linked lists, vectors or such to store those. Finally you still didn't explained what you really want, what's the problem and how should we help?

Member Avatar for Bendez Thyna
0
301
Member Avatar for infamous1987

If you place **#include <iostream>** there the program actually works...

Member Avatar for Kristian_2
0
169
Member Avatar for Praveen_10

#include <iostream> #include <cstdlib> #include<ctime> using namespace std; #define ITERATIONS 100 int HEAD; int toss_coin(){ return rand()%2;} int main(){ srand(time(0)); loop: HEAD = 0; // <- You missed such like counter reset! char c; cout << "press H for calling out head or T for calling out tail E for …

Member Avatar for David W
0
379
Member Avatar for hahahanz

Here you go. #include <iostream> #include <conio.h> #include <cctype> using namespace std; class Node { public: int data_; Node * next_; }; Node * head = NULL; Node * last_node_ptr = NULL; void Display(); void Createnode(int data_); void Removenode(int data_); void Display() { Node *node_ptr = head; if (node_ptr == …

Member Avatar for hahahanz
0
248

The End.