• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

Programming |OT| C is better than C++! No, C++ is better than C

In C, how exactly do you assign a word to a string in a struct? My professor taught how to let the user do it, but not how to hard code it.

Code:
example.name[10]="John";

Something like this is what I assumed to be correct, but apparently not.

It depends on what you mean by "string." Suppose you have this:

Code:
struct strval {
    char *sptr;
    char buf[10];
};

Note that these struct members are different types but both conceptually represent a string.

You can initialize this struct as follows:

Code:
    struct strval s = {
        .sptr = "foo",
        .buf = "bar"
    };

This is called a designated initializer, and it's supported in GNU C and C99, but not ANSI C.

If you're assigning to a struct member, these types must be treated differently:

Code:
    s.sptr = "foo";
    strncpy(s.buf, "bar", sizeof(s.buf));

You need to include <string.h> for strncpy, and you also need to be aware of the fact that strncpy may truncate the input string to fit the buffer, leaving a string that is not null-terminated. This is the source of a lot of bugs, so I would suggest reading the documentation carefully.
 

dalVlatko

Member
I'm just now learning python on my mac and I thought it was weird that to run a program it has to open up python launcher and two terminal windows (one of which seems useless). Am I missing something?
 
I'm just now learning python on my mac and I thought it was weird that to run a program it has to open up python launcher and two terminal windows (one of which seems useless). Am I missing something?

Not sure how it works on a mac but Python does need to launch the interpreter before it can run anything. Are you using some kind of IDE or just a text editor?
 

Bollocks

Member
In C, how exactly do you assign a word to a string in a struct? My professor taught how to let the user do it, but not how to hard code it.

Code:
example.name[10]="John";

Something like this is what I assumed to be correct, but apparently not.

You can't assign like that in C unless it's right at the initialization.
You need strcpy, make sure name is big enough for the string otherwise you create a buffer overflow
strcpy(name, "John");
 

BHZ Mayor

Member
I posted this in the Web Development Advice thread, but it looks pretty dead so,

I've been reading and following some tutorials on web development so I can get into it as side work and also to add those skills on my resume, as it seems there aren't many companies looking for straight non-web application developers. Almost every job of interest also wants at the least ASP, ASP.Net, and/or Javascript experience.

What do you guys think of WebMatrix or Visual Web Developer?
 

Haly

One day I realized that sadness is just another word for not enough coffee.
No, but Java has a lot of bloat. Ignore like, 25% of your syntax until you actually cover it.
 

Jokab

Member
Starting Computer Science (5 years) at university on aug 21st. I've dabbled a bit in C++ but I can't really make anything of use. Read the javascript course on codeacademy.com, think I understood most of it. Apparently most of the programming is in Java on my school, so I looked a bit at it. I could probably make really simple applications if I tried, but nothing that I could actually use in that, either. (I tried to make a calculator in javascript but kinda failed with handling the input, I used arrays to store it but couldn't separate the numbers and operators) Do I stand a chance?

Read: I know basic syntax, but I can't put it together.
 
Starting Computer Science (5 years) at university on aug 21st. I've dabbled a bit in C++ but I can't really make anything of use. Read the javascript course on codeacademy.com, think I understood most of it. Apparently most of the programming is in Java on my school, so I looked a bit at it. I could probably make really simple applications if I tried, but nothing that I could actually use in that, either. (I tried to make a calculator in javascript but kinda failed with handling the input, I used arrays to store it but couldn't separate the numbers and operators) Do I stand a chance?

Read: I know basic syntax, but I can't put it together.

You'll be fine, the whole point of doing a course in CS is that you learn it as you go. Pretty much all 4 year degrees (but yours is 5?) assume you don't know anything and start from there. It takes a while to get the hang of it but just practice, practice some more, and then when you're done, practice.
 

arit

Member
Starting Computer Science (5 years) at university on aug 21st. I've dabbled a bit in C++ but I can't really make anything of use. Read the javascript course on codeacademy.com, think I understood most of it. Apparently most of the programming is in Java on my school, so I looked a bit at it. I could probably make really simple applications if I tried, but nothing that I could actually use in that, either. (I tried to make a calculator in javascript but kinda failed with handling the input, I used arrays to store it but couldn't separate the numbers and operators) Do I stand a chance?

Read: I know basic syntax, but I can't put it together.

You will gain experience in problem solving using different concepts and techniques which then you will implement using the programming language's syntax of choice. I guess most entry classes do not require any previous knowledge, so you might be able to concentrate on the thinking side instead of mere syntax problems(even after a few years I still have to look up how the syntax for arrays is when switching programming languages).
 
Starting Computer Science (5 years) at university on aug 21st. I've dabbled a bit in C++ but I can't really make anything of use. Read the javascript course on codeacademy.com, think I understood most of it. Apparently most of the programming is in Java on my school, so I looked a bit at it. I could probably make really simple applications if I tried, but nothing that I could actually use in that, either. (I tried to make a calculator in javascript but kinda failed with handling the input, I used arrays to store it but couldn't separate the numbers and operators) Do I stand a chance?

Read: I know basic syntax, but I can't put it together.

Start with basic things. Some of my first CS class programs I had to write were rudimentary conversion programs. Converting a lowercase letter into an uppercase letter (dealing with the ascii table and such), making a temperature converter, averaging the sum of a number of entered grades and then finding the mean/median/mode of them. Mainly getting a hand at computer math and logic and such. Going into my second year with having entered with no experience, and I'm not an expert by any means, but I can do a lot more than I thought I could when I started.

Also practice practice practice!!!!

Anyway, something I personally have started to do (and I don't know if I'm alone) but I have a decent sized dry erase board, than I can get away from the computer and write down ideas and some code (shorthand, pseudocode, ect.) where I can get a better sense of where my logic is going.
 

Godslay

Banned
Anyway, something I personally have started to do (and I don't know if I'm alone) but I have a decent sized dry erase board, than I can get away from the computer and write down ideas and some code (shorthand, pseudocode, ect.) where I can get a better sense of where my logic is going.

I do a similar thing, but I use a pocket sized notebook. Most of my coding starts away from the computer actually.


I'm using IDLE

Have you tried to run your code directly from the command line, rather than going into IDLE?
 
Starting Computer Science (5 years) at university on aug 21st. I've dabbled a bit in C++ but I can't really make anything of use. Read the javascript course on codeacademy.com, think I understood most of it. Apparently most of the programming is in Java on my school, so I looked a bit at it. I could probably make really simple applications if I tried, but nothing that I could actually use in that, either. (I tried to make a calculator in javascript but kinda failed with handling the input, I used arrays to store it but couldn't separate the numbers and operators) Do I stand a chance?

Read: I know basic syntax, but I can't put it together.

You're further then me when i started.
All i know was web pages were built in HTML and didn't even know about CSS,PHP or SQL.

What i advise you to do kinda pissed i didn't do it myself is save your first your assignments and when you are at the end of year 2 or so look back and enjoy the face palming. Even in a half year time i face palm at what i did in a xna school assignment was a disaster back then implement a feature broke 5 features was a real Object oriented newb.

Don't be afraid to ask question how stupid they may sound in your head because there are only stupid answers. Because he i have to be honest CS student can be proud and think they can solve anything themselves i was one of them. Now i learned to ask no use to look for answers for tens of minutes or hours when some one can explain them to you in like 5 minutes.

Ooh and use StackOverflow it will almost fix all your problems :p
Me and a friend joke about how StackOverflow almost wrote our whole android app to remote control a vehicle over wifi.
 

PandaL

Member
I got some experience with basic embedded C Programming. I want to contribute to Open source softwares that are built using C.

BTW I've searched in Sourceforge. The projects listed there are either very big with good activity or small projects with no activity.

Could someone help me by listing/pointing out some small projects that have some activity. I would love to contribute to networking related projects. Thanks.
 

Kinitari

Black Canada Mafia
So I am almost done school, and I am now in the process of looking ahead toward employment. I'm spending a LOT of my time learning languages and whatnot, trying to get a grasp of some useful skillsets before I start looking. I want to know what advice GAF can give me, in terms of what I should start doing to increase the odds of my employment!

For market health sake, I live in Toronto - so while it's competitive, there are many many opportunities available for me

1. Skills
Right now I'll take next to -any- job I can, just to get into the field, but I also want to have the right foundation of skills to make that possible. As it is, with languages/skills/environments I'm comfy in:

C#, ASP.NET
HTML, CSS, javascript, jQuery
SQLServer, Oracle

What I am currently reading/working on getting good at:

MVC (specifically MVC4 with Razor, razor is a fucking godsend btw)
Linq/Lambda
XML/XSLT
more jQuery (about halfway through Novice to Ninja, amazing book)

What I think I should probably be reading up on more:

JSON/AJAX

2. What the fuck do I do?
Now, with my skillset - am I going in the direction with the stuff I am trying to pick up? Is there anything in particular someone who is looking to apply for entry level jobs should be looking to focus on? Is it normal to feel like I don't know -anything- when looking at the sheer amount of content out there?

What should I be looking to do for a portfolio? Is one even necessary? What sort of questions should I be expecting if I get an interview?

This is all pretty overwhelming to me, as this will be my transition from working crappy retail jobs, to working like... a salary job. The idea is terrifying to me, and I want to really be impressive, advice please!
 

XiaNaphryz

LATIN, MATRIPEDICABUS, DO YOU SPEAK IT
Just wanted to post a few things passed around the office recently:

xNiN9.jpg


8TxnC.jpg


WcssA.jpg
 

Zoe

Member
What I am currently reading/working on getting good at:

MVC (specifically MVC4 with Razor, razor is a fucking godsend btw)

Are you able to find many resources for MVC4? I still run into the occasional tutorial for MVC2 with "BTW, this has been fixed in MVC3" footnotes.

I haven't really read into MVC4 though, so I don't actually know how different it is.
 

Azih

Member
2. What the fuck do I do?
Now, with my skillset - am I going in the direction with the stuff I am trying to pick up? Is there anything in particular someone who is looking to apply for entry level jobs should be looking to focus on? Is it normal to feel like I don't know -anything- when looking at the sheer amount of content out there?

What should I be looking to do for a portfolio? Is one even necessary? What sort of questions should I be expecting if I get an interview?

This is all pretty overwhelming to me, as this will be my transition from working crappy retail jobs, to working like... a salary job. The idea is terrifying to me, and I want to really be impressive, advice please!

A portfolio of completed projects is an incredibly good way to stand out from the dozens of other resumes so I would highly recommend it. Building a website to showcase your completed projects and mention the URL in your covering letter is very meaningful. Really as an entry level applicant good places aren't expecting you to be a guru but do expect a hard worker who is willing to learn.

Every interview is different and really you'll have no idea what the interview will be like until it starts. Just stay loose, be confident. Make sure you can at the very least sketch out some simple programs in pseudo code if it ends up being a more technical interview. If the person is trying to be friendly and making small talk then respond in kind (stay professional!) and if people ask really weird questions like "How would you design a better wall?" then just be calm, rational, and think out loud; they want to see your thought processes and problem solving skills so play that up.

One thing that will turn your brain into mush but also helps is tailoring your resume and covering letter to the job description. You have a lot of skills so move the more relevant ones up and just do a summary mention of the others.

What field are you interested in?
 

Kinitari

Black Canada Mafia
Are you able to find many resources for MVC4? I still run into the occasional tutorial for MVC2 with "BTW, this has been fixed in MVC3" footnotes.

I haven't really read into MVC4 though, so I don't actually know how different it is.

There are pretty much no resources for MVC4 that I can find, other than this one- but the entire tutorial seems to be a 'bottom to the top' approach, so it's ideal for my situation. Regardless, I am pretty sure a lot of the tutorial is the exact same one for MVC3.

A portfolio of completed projects is an incredibly good way to stand out from the dozens of other resumes so I would highly recommend it. Building a website to showcase your completed projects and mention the URL in your covering letter is very meaningful. Really as an entry level applicant good places aren't expecting you to be a guru but do expect a hard worker who is willing to learn.

Every interview is different and really you'll have no idea what the interview will be like until it starts. Just stay loose, be confident. Make sure you can at the very least sketch out some simple programs in pseudo code if it ends up being a more technical interview. If the person is trying to be friendly and making small talk then respond in kind and if people ask really weird questions like "How would you design a better wall?" then just be calm, rational, and think out loud; they want to see your thought processes and problem solving skills so play that up.

One thing that will turn your brain into mush but also helps is tailoring your resume and covering letter to the job description. You have a lot of skills so move the more relevant ones up and just do a summary mention of the others.

Okay, I think when it comes to small chat and whatnot, that's really one of my strengths. Even talking to people about technical things, my biggest issue might be getting -too- passionate. As long as being right on every question doesn't matter too much, I'll still give them all a shot :p.

But, I hear you on the portfolio, I think that's probably a big focus of mine then.

But tailoring my resumes?.... ugh... I guess if it helps even 1%
 

XiaNaphryz

LATIN, MATRIPEDICABUS, DO YOU SPEAK IT
But tailoring my resumes?.... ugh... I guess if it helps even 1%

It's really not that bad. Just have a "master" resume to use as a base and then edit as appropriate to whatever position you're applying for, expanding on what's more important for a particular position and reducing the others to bulletpoint/line items.
 
So I am almost done school, and I am now in the process of looking ahead toward employment. I'm spending a LOT of my time learning languages and whatnot, trying to get a grasp of some useful skillsets before I start looking. I want to know what advice GAF can give me, in terms of what I should start doing to increase the odds of my employment!

For market health sake, I live in Toronto - so while it's competitive, there are many many opportunities available for me

1. Skills
Right now I'll take next to -any- job I can, just to get into the field, but I also want to have the right foundation of skills to make that possible. As it is, with languages/skills/environments I'm comfy in:

C#, ASP.NET
HTML, CSS, javascript, jQuery
SQLServer, Oracle

What I am currently reading/working on getting good at:

MVC (specifically MVC4 with Razor, razor is a fucking godsend btw)
Linq/Lambda
XML/XSLT
more jQuery (about halfway through Novice to Ninja, amazing book)

What I think I should probably be reading up on more:

JSON/AJAX

2. What the fuck do I do?
Now, with my skillset - am I going in the direction with the stuff I am trying to pick up? Is there anything in particular someone who is looking to apply for entry level jobs should be looking to focus on? Is it normal to feel like I don't know -anything- when looking at the sheer amount of content out there?

What should I be looking to do for a portfolio? Is one even necessary? What sort of questions should I be expecting if I get an interview?

This is all pretty overwhelming to me, as this will be my transition from working crappy retail jobs, to working like... a salary job. The idea is terrifying to me, and I want to really be impressive, advice please!

Your skills look fine.
Questions really depend on the company. I've never worked for a software company, always internal development, so most questions I was asked have been about projects I've worked on and more social, does he fit in, kind of thing. Personally, I like to ask about their work pipeline. Do they use management software, project managers, etc.

First job I was a nervous wreck and it was sink or swim the whole way. I was not prepared for a working dev environment. But I latched on to a senior dev, he showed me the ropes, broke some of my college coding habits, and eased me into the politics.
 
Completed my first intern job, I was making Adobe Air apps with Flex (and learned quite alot, already had some experience with C#, C, Java etc.) + 3D Modelling, animation and visualization. Too bad I can't use anything about those on my portfolio cause everything was classified .'(

I am taking another C# class to complete my studies in the autumn and I am pretty sure I will do well.
 

KorrZ

Member
Does anyone have any good recommendations for books on DirectX & Win32 programming with C++? I've looked all over online at various tutorials but a lot of them are hit or miss, it'd be much easier for me to learn with a good book.
 

Slavik81

Member
Does anyone have any good recommendations for books on DirectX & Win32 programming with C++? I've looked all over online at various tutorials but a lot of them are hit or miss, it'd be much easier for me to learn with a good book.

I can't recommend you a book, but from my time with C++, OpenGL and Win32 I can tell you this: you are planning on using 3 extremely low-level tools. It will be very difficult to be productive unless you're highly experienced with all of them.
 

KorrZ

Member
I can't recommend you a book, but from my time with C++, OpenGL and Win32 I can tell you this: you are planning on using 3 extremely low-level tools. It will be very difficult to be productive unless you're highly experienced with all of them.

I don't intend to learn it over night. This is a long term hobby for me I've been teaching myself C++ for almost a year now in my free time and I'm at the point where I'm tired of doing console applications. I know it's not easy but, I have to start somewhere. I want to take my C++ learning to the next level.
 

AcciDante

Member
Does anyone have any good recommendations for books on DirectX & Win32 programming with C++? I've looked all over online at various tutorials but a lot of them are hit or miss, it'd be much easier for me to learn with a good book.

http://www.rastertek.com/tutindex.html

I looked at those awhile ago and liked that they actually made C++ classes for the different systems. Covers the three things you mentioned. I don't know those technologies though, so I don't know if they're good material, but it looks solid!
 

Slavik81

Member
I don't intend to learn it over night. This is a long term hobby for me I've been teaching myself C++ for almost a year now in my free time and I'm at the point where I'm tired of doing console applications. I know it's not easy but, I have to start somewhere. I want to take my C++ learning to the next level.

If you have a good grasp of C++, and want to make the leap into GUI applications I'd highly recommend downloading the Qt SDK and building a Qt application.

Pros:
1. It's a million times easier than raw Win32.
2. The documentation is really good. Example.
3. It's cross-platform (supports Windows, OSX, Linux).
4. It's widely used in industry. I work at a Qt-based shop. It's the foundation of Maya, Photoshop Elements, VLC, and others.

Cons:
1. Because it's cross-platform, its main 3D support is for OpenGL. If you want to use DirectX, you'll have to write some code to integrate the two.
 

Haly

One day I realized that sadness is just another word for not enough coffee.
Rastertek is good to get you started but it won't get into the nitty gritty details of what things are what they are in DirectX (it's still pretty detailed nonetheless). For a deep look into a typical graphics pipeline you'll need a full fledged textbook. I have Introduction to 3D Game Programming with DirectX and Game Engine Architecture and while I can't say much for the former (never really read it, used Rastertek tutorials instead), the latter is pretty good for getting an idea of how modern games are setup in a C/C++ environment.
 

Everdred

Member
Hopefully this is a good thread for this... I'm working on a better BBCode script for my site. Everything works fine except the code breaks when there is a line break. If I quote something and that quote has a line break in it, it doesn't work.

EDIT: PHP...

My code:
Code:
function bb_parse($string) { 
    $tags = 'b|i|u|quote|spoiler|url|img|B|I|U|QUOTE|SPOILER|URL|IMG'; 
    while (preg_match_all('`\[('.$tags.')=?(.*?)\](.+?)\[/\1\]`', $string, $matches)) foreach ($matches[0] as $key => $match) { 
        list($tag, $param, $innertext) = array($matches[1][$key], $matches[2][$key], $matches[3][$key]); 
        switch (strtolower($tag)) { 
            case 'b': $replacement = "<strong>$innertext</strong>"; break; 
            case 'i': $replacement = "<em>$innertext</em>"; break;
            case 'u': $replacement = "<u>$innertext</u>"; break;
            case 'quote': $replacement = $param? "Originally Posted by: <strong>$param</strong><br><blockquote>$innertext</blockquote>" : "<blockquote>$innertext</blockquote>"; break;
            case 'spoiler': $replacement = "<span style=\"background-color:#000000;color:#000000;\">$innertext</span>"; break;
            case 'url': $replacement = '<a href="' . ($param? $param : $innertext) . "\">$innertext</a>"; break; 
            case 'img': 
                list($width, $height) = preg_split('`[Xx]`', $param); 
                $replacement = "<img src=\"$innertext\" " . (is_numeric($width)? "width=\"$width\" " : '') . (is_numeric($height)? "height=\"$height\" " : '') . '/>'; 
            break;
        } 
        $string = str_replace($match, $replacement, $string); 
    } 
    return $string; 
}
Can anyone see what is wrong?
 

KorrZ

Member
http://www.rastertek.com/tutindex.html

I looked at those awhile ago and liked that they actually made C++ classes for the different systems. Covers the three things you mentioned. I don't know those technologies though, so I don't know if they're good material, but it looks solid!

If you have a good grasp of C++, and want to make the leap into GUI applications I'd highly recommend downloading the Qt SDK and building a Qt application.

Pros:
1. It's a million times easier than raw Win32.
2. The documentation is really good. Example.
3. It's cross-platform (supports Windows, OSX, Linux).
4. It's widely used in industry. I work at a Qt-based shop. It's the foundation of Maya, Photoshop Elements, VLC, and others.

Cons:
1. Because it's cross-platform, its main 3D support is for OpenGL. If you want to use DirectX, you'll have to write some code to integrate the two.

Rastertek is good to get you started but it won't get into the nitty gritty details of what things are what they are in DirectX (it's still pretty detailed nonetheless). For a deep look into a typical graphics pipeline you'll need a full fledged textbook. I have Introduction to 3D Game Programming with DirectX and Game Engine Architecture and while I can't say much for the former (never really read it, used Rastertek tutorials instead), the latter is pretty good for getting an idea of how modern games are setup in a C/C++ environment.

Thanks for the suggestions guys, I appreciate it. Rastertek seems perfect for starting out on DirectX. Qt seems interesting as well, I'll have to dig through some of the tutorials.
 
So this year I decided to go back to school and get a CS degree. After a semester of Java I'm finally allowed to get my C on. what freedom!

I <3 you C.


Code:
#include <stdio.h>

int main(void)
{

        unsigned char endian[2] = {1,0};
        short end = *(short *) endian;

        int bignum = 1215059820;
        int bignum2 = 1701801828;
        int bignum3 = 1814065674;


        char* p = (char *) &bignum;
        char* q = (char *) &bignum2;
        char* r = (char *) &bignum3;

        int i = 0;
        int mod = 1;

        if (end == 1)
        {
            p += 3;
            q += 3;
            r += 3;
            mod *= -1;
        }

        for (i = 0; i < 4; i++)
        {

                printf("%c%c%c", *p, *q, *r);

                p += mod;
                q += mod;
                r += mod;

        }
        return 0;
}
 

hateradio

The Most Dangerous Yes Man
Hopefully this is a good thread for this... I'm working on a better BBCode script for my site. Everything works fine except the code breaks when there is a line break. If I quote something and that quote has a line break in it, it doesn't work.

EDIT: PHP...

My code:

Can anyone see what is wrong?
Most likely, you're not using a multiline setting in your RegEx.

http://us.php.net/manual/en/regexp.reference.internal-options.php

eg: '/(match_this)/m'

However, there are better options for BBCode than creating your own code. If you can get the PECL extension, try it.

http://us.php.net/manual/en/book.bbcode.php
http://pecl.php.net/package/bbcode
 

GavinGT

Banned
I've been wondering about something for a while - all my C++ experience is in creating console applications. How much of my knowledge will transfer over into doing Win32 windowed applications?
 

Slavik81

Member
So this year I decided to go back to school and get a CS degree. After a semester of Java I'm finally allowed to get my C on. what freedom!

I <3 you C.

I managed to follow it to the end, but lost you when you were doing math on parts of integers and reinterpreting them as ascii.

So I gave up and ran it.: http://ideone.com/KIpQ7

I've been wondering about something for a while - all my C++ experience is in creating console applications. How much of my knowledge will transfer over into doing Win32 windowed applications?

Event-driven programming is a rather different way of thinking about things, but the core programming concepts remain the same.
 
I managed to follow it to the end, but lost you when you were doing math on parts of integers and reinterpreting them as ascii.

So I gave up and ran it.: http://ideone.com/KIpQ7

Just a bit of fun, I'm slightly fascinated by the idea of obfuscated code and this was my first attempt at doing something myself. Abusing the fact that since an int is made up of 4 bytes and a char is 1, the characters for the printout are each 1 of those 4 bytes (x3 ints for 12 chars total). Then you just need a properly cast pointer to separate out the binary strings. the +3 / *-1 stuff is just to deal with the endian-ness of the machine, otherwise depending on what environment you run it in the chars might come out in reverse order - if that's the case then you need to start at the opposite end and step backwards. The bignums were obtained by concatenating the binary strings for the charsfour at a time and finding the int represented by each group. Writing it was honestly a lot of fun as well as being a neat little insight into how variables are stored in memory.
 

Zoe

Member
What's a good, free, source control/defect tracker/document management combination? Bonus points for VS integration.
 

MJLord

Member
Hey guys I'm having some trouble writing a stack class template in C++.
I'm going to leave the code here for you to critique but the main points I'm struggling on are removing data when something is popped off the stack and I'm not sure if I am creating new nodes in a correct fashion.

Code:
#include <iostream>

template <class T>
class List {

private:
	struct treeNode{
		T data;
		treeNode *next;
	};

	treeNode start;

public:

	List(T rootData)
	{
		start.data = rootData;
		start->next = null;
	};

	void Push(T data)
	{
		treeNode temp = start;
		start.data = data;
		start->next = makeNode(temp.data);		
	}

	T Pop()
	{
		treeNode temp = start;
		start.data = temp->&left.data;

	}


	treeNode* makeNode(T nodeData)
	{
		treeNode newNode = new treeNode;

		newNode.data = nodeData;
		newNode->next = null;

		return &newNode;
	};
};
 
Just went on Reddit and found alot of resources, tips, etc. Definitely recommend checking that site. There's even a reddit for daily programming challenges.
 
Top Bottom