MESSAGE
DATE | 2016-11-09 |
FROM | Ruben Safir
|
SUBJECT | Subject: [Learn] =?utf-8?q?C++_call_of_overloaded_=E2=80=98track=28int*=26?=
|
From learn-bounces-at-nylxs.com Wed Nov 9 10:08:27 2016 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: from www.mrbrklyn.com (www.mrbrklyn.com [96.57.23.82]) by mrbrklyn.com (Postfix) with ESMTP id 7A3A0161316; Wed, 9 Nov 2016 10:08:27 -0500 (EST) X-Original-To: learn-at-nylxs.com Delivered-To: learn-at-nylxs.com Received: from [10.0.0.62] (flatbush.mrbrklyn.com [10.0.0.62]) by mrbrklyn.com (Postfix) with ESMTP id B52BA160E77; Wed, 9 Nov 2016 10:08:18 -0500 (EST) To: Hangout , learn-at-nylxs.com From: Ruben Safir Message-ID: <71264c97-a496-d1e4-dbc8-6142ea533846-at-mrbrklyn.com> Date: Wed, 9 Nov 2016 10:08:18 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------627ED657BA461858C5C47E57" Subject: [Learn] =?utf-8?q?C++_call_of_overloaded_=E2=80=98track=28int*=26?= =?utf-8?b?LCBpbnQmLCBpbnQmLCBpbnQqJinigJkgaXMgYW1iaWd1b3Vz?= X-BeenThere: learn-at-nylxs.com X-Mailman-Version: 2.1.17 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: learn-bounces-at-nylxs.com Sender: "Learn"
This is a multi-part message in MIME format. --------------627ED657BA461858C5C47E57 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit
I'm getting this crazy error about multiple definitions of a function that I have a single definition of. Is this because of namespace usage or the recursive function.
-- So many immigrant groups have swept through our town that Brooklyn, like Atlantis, reaches mythological proportions in the mind of the world - RI Safir 1998 http://www.mrbrklyn.com
DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002 http://www.nylxs.com - Leadership Development in Free Software http://www2.mrbrklyn.com/resources - Unpublished Archive http://www.coinhangout.com - coins! http://www.brooklyn-living.com
Being so tracked is for FARM ANIMALS and and extermination camps, but incompatible with living as a free human being. -RI Safir 2013
--------------627ED657BA461858C5C47E57 Content-Type: text/x-c++src; name="main.cpp" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="main.cpp"
/* * ===================================================================================== * * Filename: main.cpp * * Description: merge sort main * * Version: 1.0 * Created: 11/09/2016 09:33:20 AM * Revision: none * Compiler: gcc * * Author: Dr. Fritz Mehner (mn), mehner-at-fh-swf.de * Company: FH Südwestfalen, Iserlohn * * ===================================================================================== */ #include #include "msort.h"
int main(int argv, char **argc) { return 0 }
--------------627ED657BA461858C5C47E57 Content-Type: text/plain; charset=UTF-8; name="make.deps" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="make.deps"
bWFpbi5vOiBtYWluLmNwcCAvdXNyL2luY2x1ZGUvc3RkYy1wcmVkZWYuaCBcCiAvdXNyL2lu Y2x1ZGUvYysrLzYuMi4xL2lvc3RyZWFtIFwKIC91c3IvaW5jbHVkZS9jKysvNi4yLjEveDg2 XzY0LXBjLWxpbnV4LWdudS9iaXRzL2MrK2NvbmZpZy5oIFwKIC91c3IvaW5jbHVkZS9jKysv Ni4yLjEveDg2XzY0LXBjLWxpbnV4LWdudS9iaXRzL29zX2RlZmluZXMuaCBcCiAvdXNyL2lu Y2x1ZGUvZmVhdHVyZXMuaCAvdXNyL2luY2x1ZGUvc3lzL2NkZWZzLmggXAogL3Vzci9pbmNs dWRlL2JpdHMvd29yZHNpemUuaCAvdXNyL2luY2x1ZGUvZ251L3N0dWJzLmggXAogL3Vzci9p bmNsdWRlL2dudS9zdHVicy02NC5oIFwKIC91c3IvaW5jbHVkZS9jKysvNi4yLjEveDg2XzY0 LXBjLWxpbnV4LWdudS9iaXRzL2NwdV9kZWZpbmVzLmggXAogL3Vzci9pbmNsdWRl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iAvdXNyL2luY2x1ZGUv YysrLzYuMi4xL2JpdHMvaXN0cmVhbS50Y2MgbXNvcnQuaAptc29ydC5vOiBtc29ydC5jcHAg L3Vzci9pbmNsdWRlL3N0ZGMtcHJlZGVmLmggbXNvcnQuaAo= --------------627ED657BA461858C5C47E57 Content-Type: text/plain; charset=UTF-8; name="makefile" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="makefile"
Q1hYOj1nKysgCkNYWEZMQUdTOj0tV2FsbCAtZ2dkYiAKCkxERkxBR1M6PS1ML3Vzci9sb2Nh bC9saWIvbXlzcWwgLWxteXNxbHBwIC1sbXlzcWxjbGllbnQKCm1zb3J0IDoJbXNvcnQubyBt YWluLm8KCSR7Q1hYfSAgJHtDWFhGTEFHU30gLW8gbXNvcnQgbXNvcnQubyBtYWluLm8KCm1h aW4ubyA6CW1haW4uY3BwCgkke0NYWH0gICR7Q1hYRkxBR1N9IC1vIG1haW4ubyAtYyBtYWlu LmNwcAkKCm1zb3J0Lm8gOgltc29ydC5jcHAJbXNvcnQuaAoJJHtDWFh9ICAke0NYWEZMQUdT fSAtYyBtc29ydC5jcHAKCmNsZWFuCTogCglybSBub2RlcyAqLm8gbWFrZS5kZXBzCgl0b3Vj aCAqLmNwcCAqLmgKCmluY2x1ZGUgbWFrZS5kZXBzCm1ha2UuZGVwczogKi5jcHAgOyBnY2Mg LU0gKi5jcHAgPiRACg== --------------627ED657BA461858C5C47E57 Content-Type: text/x-c++src; name="msort.cpp" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="msort.cpp"
#include "msort.h"
using namespace merge;
int max(int x, int y){ int ret; x>y ? ret=x : ret=y; return ret; }
void track(int* in, int left, int right, int* space) { int i = 0; int length = right - left; if(right == left + 1){ return; } int mpt = length/2; int pos1 = left; int pos2 = left + mpt; int pos3 = right; //do the recursion now on the left and right branches track(in, pos1, pos2, space); track(in, pos2, pos3, space); for(i = 0; i < length; i++) { if(pos1 < pos2 && ( pos2 == pos3 || max(in[pos1], in[pos2]) == in[pos1])) { space[i] = in[pos1]; pos1++; } else{ space[i] = in[pos2]; pos2++; } } /* transfer array segment */ for(i = left; i < right; i++) { in[i] = space[i - left]; } }
--------------627ED657BA461858C5C47E57 Content-Type: text/x-chdr; name="msort.h" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="msort.h"
/* * ===================================================================================== * * Filename: msort.h * * Description: Header File for Parrell Msort algorthm * * Version: 1.0 * Created: 11/09/2016 04:28:51 AM * Revision: none * Compiler: gcc * * Author: Dr. Fritz Mehner (mn), mehner-at-fh-swf.de * Company: FH Südwestfalen, Iserlohn * * ===================================================================================== */ #ifndef MSORT_INC #define MSORT_INC
namespace merge{
int max(int x, int y); void track(int* , int , int , int* ); int sort(int &input , int size);
} #endif /* ----- #ifndef MSORT_INC ----- */
--------------627ED657BA461858C5C47E57 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline
_______________________________________________ Learn mailing list Learn-at-nylxs.com http://lists.mrbrklyn.com/mailman/listinfo/learn
--------------627ED657BA461858C5C47E57--
|
|