vividexstance's Profile User Rating: *****

Reputation: 772 Master
Group:
Expert
Active Posts:
2,720 (1.45 per day)
Joined:
31-December 10
Profile Views:
17,529
Last Active:
User is offline Yesterday, 04:29 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Who Cares
Dream Kudos:
0
Expert In:
C/C++

Latest Visitors

Icon   vividexstance has not set their status

Posts I've Made

  1. In Topic: Help with binary trees to store and print words

    Posted 13 Feb 2016

    You can't return local variables as pointers from a function. Once the function returns and ends, those local variables are destroyed. You need to allocate the string on the heap using malloc, and return that pointer.

    Also, like Jim has already said, any storage allocated using malloc must be deallocated using free() once that storage is no longer used or needed.
  2. In Topic: Multiple printf, scanf and classes

    Posted 20 Jan 2016

    Like Skydiver already said though, you're coding in C using a C++ compiler. printf() and scanf() are all a part of the standard C library. The standard C++ library uses input/output streams, mainly cin, cout, and cerr.

    Here's a link to a good reference page for both C/C++.
  3. In Topic: Class doesn't "name a type" even when included :/

    Posted 17 Jan 2016

    You need to post the exact error/warning messages you're receiving.

    I'd also like to see this ant.h and ant.cpp files because in ant.cpp you got this error:

    Quote

    ant.cpp:6:1: error: 'Ant' does not name a type
  4. In Topic: Error 10049 when using Windows API Sockets

    Posted 17 Jan 2016

    When you make changes, could you please post the smallest, yet complete, snippet that shows the change(s) you made? This way we can tell if the change is the problem or if it's somewhere else.
  5. In Topic: Desktop drawing unexpected "feature"

    Posted 17 Jan 2016

    Let's take a step back.

    What exactly is it that you're trying to do? Also, what OS version are you running?

Comments

Page 1 of 1
  1. Photo

    orihotomihsah Icon

    09 Sep 2013 - 09:45
    Hi
Page 1 of 1