Anarion's Profile User Rating: *****

Reputation: 378 Architect
Author w/DIC++
Active Posts:
1,654 (0.69 per day)
16-May 09
Profile Views:
Last Active:
User is offline Yesterday, 02:42 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   Anarion has not set their status

Posts I've Made

  1. In Topic: return the address from a function

    Posted 17 Nov 2015

    One reason to return an address from a function would be if you are constructing an object inside the function and you intend to keep it alive after the function's scope is ended:
    SomeObject* function() {
        SomeObject* p_object = new SomeObject; //allocate and construct an object
        //some code
        return p_object;

    But there is one other thing: using naked pointers like above is not a good practice. Why? Because the chances of messing it up is high. You could use a smart pointer instead, to do exactly the same but also avoid most of the nasty pitfalls.

    There may be situations that the best option is to use a raw pointer, due to resource/system limitations. But if there are no limitations, using raw pointers doesn't seem to be the best option ;)
  2. In Topic: Keep getting errors in my program.

    Posted 1 Sep 2015

    A couple problems that I am seeing in your code:

    Look at the function's declaration:
    void countWord(const string& word, int &countNumbers, int &countWords);

    Then look at the function call and the arguments that have been passed to it:
    countWord(word, countWords, countNumbers);

    Looks like you have the second and third arguments in the wrong order.

    Then, here:
    if (word_start = true) {

    In the above if statement, you are mistakenly assigning true to word_start. What you meant to write was:
    if (word_start == true) {

    Now you are checking to see if the value of word_start is true or not.
  3. In Topic: Can someone please point out where this bug is coming from?

    Posted 31 Aug 2015

    View PostHonky, on 01 September 2015 - 07:43 AM, said:

    It kept rounding down the value for onec so I added 0.5 to the value in order to make it round up.

    In this case, why not use the ceil function from <math.h>? It will round the value up.
  4. In Topic: Makefile error - make: make: Command not found

    Posted 31 Aug 2015

    Based on the information located [ Here ], you shouldn't use the command make when you are calling it recursively. Instead, use $(MAKE):
        $(MAKE) -C $(PATH) M=$(shell pwd) modules

    Edit: And this page has some brief information on recursive make calls if you need more information or examples.
  5. In Topic: Learning Multiple Languages at the Same Time

    Posted 31 Aug 2015


    If you're learning your first language, it's absolutely better to concentrate on learning that language well before you think about your second language. The reason is simple: when you're learning your first language, you're learning three different things, all at once. You're learning the syntax and structure of the language, you're learning how to reason about programs ("why is this while loop incorrect?"), and you're learning the rudiments of computer science (ie, why should I not sort the words in War and Peace with bubblesort?).

    This. +10 reps for that and the rest of the explanation, only if it was possible to do so!

My Information

Member Title:
The Persian Coder
23 years old
May 17, 1992
Music, Tennis, Programming, KitKat, Cars, Bikes
Full Name:
Kian N.
Years Programming:
Programming Languages:
C++, PHP, R, JavaScript, HTML, CSS

Contact Information



Page 1 of 1
  1. Photo

    Xupicor Icon

    31 Aug 2015 - 13:05
    Well, you can hit me up on Steam or gmail at the same handle. ;) I'm also from time to time at TeamSpea if you prefer that, I don't use Skype.
  2. Photo

    Xupicor Icon

    27 Aug 2015 - 08:06
    You're doing a nice job, in the help and in the tutorial section, yourself. ;) I was seriously thinking about making a video tutorial on C++, featuring exempts from the standard to source stuff (they'd be shown as a visual side-note, since they themselves would be way too dry for a beginner), but it's a scary amount of work...
  3. Photo

    Xupicor Icon

    26 Aug 2015 - 07:00
    You really went to town with those upvotes today. :P
  4. Photo

    Hybrid SyntaX Icon

    10 Feb 2014 - 14:02
  5. Photo

    estherNamogo Icon

    03 Nov 2013 - 06:33
    Nice to meet you write
    me at ( i will send you my picture OK.
  6. Photo

    jatinjindalj Icon

    06 Sep 2012 - 09:01
    Hey Regarding your code snippet at>
    Can you please explain:
    why when at line 37 and 38,If I do
    while(q!= NULL) {//Line 37
    q = q->link;
    t = new node;
    t->data = str;
    t->link = NULL;<...
  7. Photo

    Anarion Icon

    07 Aug 2012 - 06:23
    Thanks! I had made it for DIC Signature Contest and put it on my sig since then.
  8. Photo

    AnalyticLunatic Icon

    06 Aug 2012 - 09:05
    Just wanted to drop by and say Sweet Sig. Sometime I need to make one for myself.
  9. Photo

    David W Icon

    07 Jun 2012 - 00:31
    Shalom shalom my Regal Persian Coder Friend
  10. Photo

    Anarion Icon

    16 Mar 2011 - 00:56
    @abrsefid: ba arze sharmandegi, komaki az man sakhte nist. Az beine portha faghat ba USB kar kardam oon ham dar sathe kheili payin. Be shoma pishnahad mikonam baraye javabe soaletun dar internet jostejoo konid :)
  11. Photo

    yogesh201010 Icon

    05 Mar 2011 - 18:41
    hi i am yogesh
    how to connect internet by mob in linux.
    and tell me book for linux learning
  12. Photo

    abrsefid Icon

    27 Feb 2011 - 05:23
    salam man donbale 1 code c++ (ubuntu) migardam vase send o receive data ba port serial mishe rahnamaeem konid ?
  13. Photo

    hamishehiran Icon

    10 Aug 2010 - 23:02
    thanks for add! ;) nice to meet you!
  14. Photo

    Anarion Icon

    28 Mar 2010 - 08:27
    Thanks! Happy new year to you too :)
  15. Photo

    saSBH2 Icon

    28 Mar 2010 - 07:03
    Happy New Year :)
Page 1 of 1