stupid computer programming question only for C/C++ gearheads

Message Bookmarked
Bookmark Removed
What is the meaning of the first prototype here? How does it compare to #2?

void foo(int &bar);
void foo(int *bar);

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 16:21 (eighteen years ago) link

Mainly in syntax in the body of the function.

In the former.. you can do the following:

bar = 0;

In the latter.. you have to do the following:

*bar = 0;

References like this are just an easy way to make a parameter in/out without having to change the syntax if it were previously passed by copy.

CONST references are far more useful, because they can pass a major object by reference, but still offer much of the same protection from being written over as a pass by copy (and I stress "much")

donut hallivallerieburtonelli omg lol (donut), Tuesday, 4 October 2005 16:29 (eighteen years ago) link

Thank you, now I remember.

As far as const references, doesn't that just prevent you from reassigning the pointer within the function? (such a reassignment is meaningless -- the pointer is in the current stack frame)

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 16:33 (eighteen years ago) link

Well, const refs are meaningless with scalar types, but with objects like classes and structs, you are prevented from calling methods that could change the internals of the object. You are, however, allowed to reference object methods that are declared as const in the class declaration.. like Get methods or what have you.

donut hallivallerieburtonelli omg lol (donut), Tuesday, 4 October 2005 16:36 (eighteen years ago) link

ahhhhhh!

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 16:36 (eighteen years ago) link

Const is like the Maximum Rock N' Roll of C++.. you either have to be all const or you have to just say "fuck const, man". There is a line, and if you cross it, you're just as bad as everyone else on that side.

donut hallivallerieburtonelli omg lol (donut), Tuesday, 4 October 2005 16:37 (eighteen years ago) link

Const fxns are C++ only right?

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 16:38 (eighteen years ago) link

I believe so, yeah. (My practical experience with C in general has been 95% C++ though.)

donut hallivallerieburtonelli omg lol (donut), Tuesday, 4 October 2005 16:39 (eighteen years ago) link

(I know const functions within classes are definitely C++ only, since classes are C++ only by definition. But you obv. knew that already.)

donut hallivallerieburtonelli omg lol (donut), Tuesday, 4 October 2005 16:41 (eighteen years ago) link

Overloading the bitshift operators for io = MAJOR DUD

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 20:28 (eighteen years ago) link

Eh, I've never had any practical problems with the bitshift overloading, though it is a bit icky aesthetically.

RickyT (RickyT), Tuesday, 4 October 2005 20:36 (eighteen years ago) link

Much more annoying is that the closing pointy brackets in eg map are interpreted as being a right shift. The number of times I have typed something like that without thinking is ridiculous.

RickyT (RickyT), Tuesday, 4 October 2005 20:38 (eighteen years ago) link

Bollocks, forgot abt html - that map above shd read map<int,vector<int>>

Oh and const functions only make sense (and are only legal IIRC) as non-static member functions because they need to be const with respect to an actual object.

RickyT (RickyT), Tuesday, 4 October 2005 20:43 (eighteen years ago) link

well, arguments of any fxn can be const right?

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 21:03 (eighteen years ago) link

Yes. But the notion of a const function is different. Take the following declaration.

class A
{

}

RickyT (RickyT), Tuesday, 4 October 2005 21:06 (eighteen years ago) link

well, yes

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 21:07 (eighteen years ago) link

Ignore that. Something weird just happened and posted before I was finished.

class A
{
int function1(const B& bob);
int function2(const B& bob) const;
};

The first function is a non-const function, the second a const one. It's legal to call either on a non-const object of class A, but only legal to call the second on a const object of class A.

RickyT (RickyT), Tuesday, 4 October 2005 21:12 (eighteen years ago) link

Overloading the bitshift operators for io = MAJOR DUD

It was an interesting idea that ended up having pretty much zero use in the real world.

Yeah, MAJOR DUD.

donut hallivallerieburtonelli omg lol (donut), Tuesday, 4 October 2005 21:17 (eighteen years ago) link

C++ is mostly a dud. Unfortunately, we're stuck with it.

C, though, is an ultra classic.

Const is classic though in all of its many meanings. Const correctness may be bondage and discipline, but it helps out a lot.

mikef (mfleming), Tuesday, 4 October 2005 23:12 (eighteen years ago) link

C# is ok as is Objective C

Jonothong Williamsmang (ex machina), Tuesday, 4 October 2005 23:32 (eighteen years ago) link

two years pass...

Hey guys.

I'm losing my job in the up and coming year or so due to changes in our company. I've decided to look into computer programming as a next step career. I'm just after casual discussion on what any ilxors are doing currently, or have done in the recent past. I only really know C++ and java and am still only a real novice in both of those, but I'm willing to learn other languages if it's more suitable.

I have no idea about programming in the real world, what job opportunities are out there for budding beginners like myself ?

Ste, Wednesday, 16 January 2008 13:26 (sixteen years ago) link

^^^ same

ken c, Wednesday, 16 January 2008 13:43 (sixteen years ago) link

I get the impression no one starts new projects in C++ anymore, so maybe think about learning something a bit more modern? But really, the best thing you can do is learn C inside-out. If you figure that out then picking up most any other language is going to be a morning's work. If you find C heavy going then maybe take a look at Python and then come back to C.

As far as the jobs themselves go, no idea. I stuck to academia.

caek, Wednesday, 16 January 2008 14:03 (sixteen years ago) link

thanks caek, any suggestions on a language alternative to C/C++ then?

Can't believe there aren't any more ilxors working in the programming business. for shame.

Ste, Thursday, 17 January 2008 11:24 (sixteen years ago) link

Uh I think there are a lot of ILX programmers... not sure where they are.

Java, VB.NET, or C# is the way to go right now. Everything is becoming web-based and almost all of that is being done in those languages. If you already know some Java, I'd say stick down that course. Scripting languages like PHP is another way you could go, but I think Java is your best bet.

Vinnie, Thursday, 17 January 2008 15:44 (sixteen years ago) link

yay JAVA I learnt quite a lot of java from uni

however, this was 7 years ago.. i assumed a lot of moved on since.. what is the hot thing that one needs to know now? see when i finished uni it was like all about Java RMI and CORBA...

ken c, Thursday, 17 January 2008 15:51 (sixteen years ago) link

java's moved on leaps and bounds now that it's graphical

ken c, Thursday, 17 January 2008 17:40 (sixteen years ago) link

If you want to program for PCs, these suggestions are good. If you want to program for devices, you should learn C/C++. I can't tell you what a nightmare it is to run Java on embedded systems. Java seems to bring out the laziest tendencies of programmers.

schwantz, Thursday, 17 January 2008 17:57 (sixteen years ago) link

Also the Java APIs on mobile platforms are usually so crippled.

Catsupppppppppppppp dude 茄蕃, Thursday, 17 January 2008 18:08 (sixteen years ago) link

In a lot of ways C++ is a terrible pain in the ass though. If you just want to write something quickly that will run on Windows, with rich graphical controls and pretty good performance, give me .Net any day.

o. nate, Thursday, 17 January 2008 18:19 (sixteen years ago) link

well no shit....

Catsupppppppppppppp dude 茄蕃, Thursday, 17 January 2008 18:34 (sixteen years ago) link

http://www.kiberpipa.org/gallery/album189/DSCN0794.sized.jpg

am0n, Thursday, 17 January 2008 18:39 (sixteen years ago) link

Trying to answer Ste's question though - for a beginner trying to break into programming, I think you need to figure out what kind of programming you want to do: web, database, windows-application, server-side, embedded, etc. Then you need to solve a chicken & egg problem - no one wants to hire you if you don't have any experience, but how are you going to get experience until someone hires you? For that, I'd suggest maybe figuring out some way you could either use programming in your current job, or consider taking a class that involves programming project work, or maybe spend some extracurricular time on a shareware project of your own. If it turns out to be something useful, it could be a great source of publicity and look good on your resume.

o. nate, Thursday, 17 January 2008 19:19 (sixteen years ago) link

cheers o.nate. That's some healthy advice to get me thinking.

Ste, Thursday, 17 January 2008 20:33 (sixteen years ago) link

two months pass...

okay, I've been learning OpenGL lately which is my first step into 3d graphics. It's pretty simples and I'm really enjoying it and am gearing up to start my first project with it, but I'm starting to maybe think that Directx would have been a more sensible option as I've heard it's faster for games.

thoughts?

Ste, Thursday, 3 April 2008 09:39 (sixteen years ago) link

http://en.wikipedia.org/wiki/Comparison_of_OpenGL_and_Direct3D

"Direct3D is a proprietary API designed by Microsoft Corporation for hardware 3D acceleration on the Windows platform. OpenGL is an open standard API that provides a number of functions for the rendering of 2D and 3D graphics and is available on most modern operating systems."

which pretty much settles it for me.

koogs, Thursday, 3 April 2008 10:09 (sixteen years ago) link

are you referring to the multi platform significance in that statement?

i hear they're releasing opengl3 this year, which is going to be a complete revamp of the structure. So I still could be learning all this for nought. sigh.

Ste, Thursday, 3 April 2008 10:44 (sixteen years ago) link

the 'proprietary API designed by Microsoft' and 'open standard API' bits.

opengl3 will be a while yet, i think. take the time to get used to the 3d geometry bits. and maybe try to write them in a way that'll let you change your 'display layer' later. or use something like SDL which is cross platform and might buffer you from opengl api changes (and provides similar extra bits to those that directx adds to direct3d, ie input and audio)

JOGL is fun, in a run-everwhere kind of way. and processing.org which is java-like but easier. i tend to come back to using xscreensaver core (which is C) as a framework for anything more involved.

koogs, Thursday, 3 April 2008 11:56 (sixteen years ago) link

Well, they're on DirectX 9 or 10 (?) now and I don't know about complete design overhauls but each new version renames a bunch of classes and functions (tried to teach myself DX8 using DX7 book and gave up in frustration pretty quickly, but then I'm like that).

I only did a little GL some time ago but I still think of things I learnt then that are useful now, and not necessarily just in GL (right now I should be writing something which effectively steals the "display list" idea, hohum).

Would like to get back into... either DX or GL. Actually I have a little project in mind that would seem to involve learning DirectSound, so maybe that would lead me to the DirectX side of the graphics divide. Most likely I'll continue to ignore my daydream project for another year or two, since it was first hatched at least 15 months ago. Sigh. Finding the time/energy to learn new non-work coding stuff is hard.

a passing spacecadet, Thursday, 3 April 2008 12:13 (sixteen years ago) link

In case I didn't spell it out properly I don't know a whole lot about DirectX, so maybe I'm wrong about the renaming stuff, but it was frustrating to a beginner (then again maybe the book just plain got it wrong; I've looked at two and one of them seemed OK but the other was full of things that even I could tell were mistakes, I just didn't know enough to guess at fixing most of them).

a passing spacecadet, Thursday, 3 April 2008 12:15 (sixteen years ago) link

(think DX10 was new for vista and only exists on xp as a kludge. internet would seem to concur. in fact it was meant as a vista exclusive and held over peoples' heads as another reason to upgrade. this is the kind of bollocks that makes me not want to touch it with a pole.)

openGL equiv of directsound is openAL but, again, SDL does both.

my dream project (audio division): software-only version of this: http://www.youtube.com/watch?v=0h-RhyopUmc (reactable)

koogs, Thursday, 3 April 2008 12:27 (sixteen years ago) link

Yes I've already delved into SDL but I thought it best to learn the bare bones of OpenGL anyway.

I've already read the Beginning OpenGL book which was pretty decent but skimmed on a lot, so now I've got the 'red book' which features a lot more.

Spent too long now putting off projects, and at the moment I feel I'm on a bit of a roll in getting things done. Fingers crossed it lasts.

Ste, Thursday, 3 April 2008 13:10 (sixteen years ago) link

i've done dx9 projects for work. it's decent. as easy as opengl imho. the general way you do things is somewhat the same from a high level point of view. planning on any particular api to last the test of time is going to have it's painful moments.

koogs' advice about abstracting your display layer out is gold. same with that sound software. :)

that's a sweet interface. i've been working on a pac man loops game/instrument where you set certain wavs to play for certain game actions (like going up) and then you drive pac around in a loop and then you can set him on autopilot, grab a second character and repeat. throw in an effect weather cloud. etc etc. it's still a pile of nothing yet because it's hard to have time to work on it. day job has been sapping my will to program. that and the visual studio tools are all upgrading and holy shit are they expensive. depressing.

keep. hope. alive. i really need to quit world of warcraft.

msp, Thursday, 3 April 2008 13:27 (sixteen years ago) link

pac man loops game/instrument

This sounds awesome!

I really need to quit... ILX? Work? Sleeping? ;_;

a passing spacecadet, Thursday, 3 April 2008 13:36 (sixteen years ago) link

pacman loops thing reminds me of http://www.pawfal.org/al-jazari/ which itself looks like a 3d version of something i saw decades ago on tv (you had mirrors and rotators to define paths, things would trundle down them setting off effects, like a modtracker but less linear, more colourful) and always fancied copying myself.

(facetious comment about cost of dev tools on linux deleted) 8)

koogs, Thursday, 3 April 2008 13:46 (sixteen years ago) link

oh i know... i have fedora 8 on my newest machine. (i'll be damned to pay for another copy of xp or vista)... but c# has become my language of choice lately. i need to check out mono. that might be my route to dev c# on linux.

java might be easier overall.

al-jazari... what a name...

msp, Thursday, 3 April 2008 17:05 (sixteen years ago) link

it is a great name for what it does:
http://en.wikipedia.org/wiki/Al-Jazari

going mad trying to find the little sound toy thing i mentioned above. saw it on tv, remember it being listed on yahoo directory, or somewhere like that, at the time, saw a copy for sale, maybe, in virgin megastore. about 1997, something like that. name was so generic though, 'tone'something, something'beat'? argh.

koogs, Thursday, 3 April 2008 17:24 (sixteen years ago) link

possibly simtunes, an early Toshio Iwai effort. name does sound familiar but maybe from recent elektroplankton reviews.

http://www.cdaccess.com/html/pc/simtunes.htm

koogs, Thursday, 3 April 2008 17:48 (sixteen years ago) link

so I'm in full flow with this Opengl lark and feel very comfortable with constructing models, lighting, textures etc. Or so I thought, my problem lies with optimizing the code.

A very very simple program for instance which just rotates a couple of polygons seems to cause all other running apps to come to a grinding halt, or at least reduces them to a stuttering wreck. Is there something in the code I should be aware of that could cause resource problems?

any opengl experts out there?

Ste, Wednesday, 16 April 2008 09:53 (sixteen years ago) link

i think both are valid

http://www.cppgameprogramming.com/cgi/nav.cgi?page=arrayclasses

Dog myDogs[5];

koogs, Thursday, 11 February 2010 17:43 (fourteen years ago) link

oh, if you use pointers then you have to later create the instances using new and then you get to use the parameters

using the non-pointer form it'll try and use a 0 parameter constructor and will complain if there isn't one. which i think is what you're seeing.

koogs, Thursday, 11 February 2010 17:45 (fourteen years ago) link

http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.5

"If your class doesn't have a default constructor, you'll get a compile-time error when you attempt to create an array using the above simple syntax..."

koogs, Thursday, 11 February 2010 17:47 (fourteen years ago) link

ahhh default constructor. many many thanks!

bracken free ditch (Ste), Thursday, 11 February 2010 18:55 (fourteen years ago) link

three years pass...

if you want to learn to program today, in 2013, for the web, what are the recommended language to focus on? html/html5/css3/ + ruby on rails?

kenjataimu (cozen), Friday, 21 June 2013 10:11 (ten years ago) link

i have asked that question of a few ppl lately they all said html5 & java, emphasis on java

should we bin tapping? (darraghmac), Friday, 21 June 2013 10:16 (ten years ago) link

lol java.

absolutely start with html5 + css3. without them you are nothing.

ruby on rails is kind of a ghetto, but it's a big ghetto. whether it's a good place to start depends on whether you can program in any other language yet. like if you're not familiar with basic procedural programming it's going to turn you into a weird programmer imo.

caek, Friday, 21 June 2013 10:39 (ten years ago) link

ha imma get on to my 'expert' mates and tell them u said so

should we bin tapping? (darraghmac), Friday, 21 June 2013 10:40 (ten years ago) link

We are doing all our new development using python/django (ditching PHP/Zend which all the legacy stuff uses). Seems like that's quite popular at the moment but could be a fad? I dunno.

Just noise and screaming and no musical value at all. (Colonel Poo), Friday, 21 June 2013 10:41 (ten years ago) link

i learnt html/css back in the zen garden days, but at the time the standard text was a previous edition of this

http://www.amazon.com/HTML5-Visual-QuickStart-Guide-Edition/dp/0321719611

caek, Friday, 21 June 2013 10:41 (ten years ago) link

Did they maybe mean javascript? Can't imagine why anyone would say to learn Java for web programming nowadays.

Just noise and screaming and no musical value at all. (Colonel Poo), Friday, 21 June 2013 10:42 (ten years ago) link

your expert mates probably said javascript, which is a necessary evil xxxp

caek, Friday, 21 June 2013 10:42 (ten years ago) link

python is absolutely the best language to learn programming in, and it happens to be useful in many practical situations including web programming.

i'm not super familiar with django, but it seems to have survived the rails onslaught at least.

i know the ultracool kids don't use either any more though.

caek, Friday, 21 June 2013 10:43 (ten years ago) link

belay that book recommendation btw. the author has changed since the edition i had, and the reviews sound ominous.

caek, Friday, 21 June 2013 10:45 (ten years ago) link

FWIW I attempted to teach myself Java about 12 years ago, when my only experience with any kind of coding was simple shell scripts, Commodore BASIC & a bit of SQL and failed miserably. A couple of years later I got a job as a database developer through my SQL experience and learnt Python on the job and found it quite easy in comparison. So I'd echo caek in that python is a good language to start with.

Just noise and screaming and no musical value at all. (Colonel Poo), Friday, 21 June 2013 10:49 (ten years ago) link

all our new, shiny web front ends are done with GWT

http://en.wikipedia.org/wiki/Google_Web_Toolkit

which (i'm told) is javascript 'compiled' from java-like code.

but it'll be something else tomorrow, probably.

koogs, Friday, 21 June 2013 10:50 (ten years ago) link

xp - how useful is python for 'the web' though?

koogs, Friday, 21 June 2013 10:50 (ten years ago) link

Useful enough for Youtube & Reddit, for example.

Just noise and screaming and no musical value at all. (Colonel Poo), Friday, 21 June 2013 10:54 (ten years ago) link

i mean you could start with C or a toolkit, but one is too low level and the other too high.

C is great and fundamental but it's been relegated to computer science these days as higher level languages like python and perl and java have become more polished.

a toolkit or even a specific platform is not the place to start if you can't code. you do need to know a programming language and be at least with variables, flow, etc. if not OOP and functional stuff. the actual language you learn in is not terribly important, but it seems a shame to waste the opportunity to learn a language that is practically useful in 2013, which is where python comes in.

caek, Friday, 21 June 2013 11:23 (ten years ago) link

what's the thinking on CS degree vs. self-taught route?

kenjataimu (cozen), Friday, 21 June 2013 12:41 (ten years ago) link

As someone who did the latter I sometimes wish I'd done a CS degree because my colleagues who did have a much more rounded skillset than I do. Tbh, though, this hasn't really hampered me that much, because I primarily work with higher-level stuff like Python & SQL, so for my job I don't really need to know exactly how machine code works or anything like that, it's more for my own personal curiosity that I'd go back and change my degree subject if I had the chance.

In terms of career prospects, I think it def helps to have a CS degree at the start of your career, but once you have a few years experience behind it doesn't seem to matter a shit. Nobody's ever been bothered about my lack of CS degree.

Just noise and screaming and no musical value at all. (Colonel Poo), Friday, 21 June 2013 12:49 (ten years ago) link

^^^ cosign
My degree is also in a non-CS subject (Information Systems Design, so it's still related), and it was only a slight disadvantage in the first few years after I graduated. And then only really a problem with recruiters and HR wonks ("oh, you don't have a CS degree, oooohhhhhh" <insert teeth sucking sound>).

go cray cray on my lobster soufflé (snoball), Friday, 21 June 2013 13:22 (ten years ago) link

i get the impression it matters much less in development for the web (serious database work notwithstanding) than apps, games, os stuff etc.

caek, Friday, 21 June 2013 13:29 (ten years ago) link

the #trendy #data #science stuff at the moment, it's more useful to have a science/maths phd than a compsci undergrad.

caek, Friday, 21 June 2013 13:30 (ten years ago) link

I have a law degree, will that do

kenjataimu (cozen), Friday, 21 June 2013 13:43 (ten years ago) link

I have a psychology degree, so most probably, yes.

Just noise and screaming and no musical value at all. (Colonel Poo), Friday, 21 June 2013 14:01 (ten years ago) link

Shouldn't be an issue. One programming team I worked with had no-one with a CS degree. In fact they'd come from all kinds of backgrounds. One of the senior programmers had been head of Humanities at a secondary school.

go cray cray on my lobster soufflé (snoball), Friday, 21 June 2013 14:27 (ten years ago) link

I take it jobs are pretty portable? is it common for UK devs to go work in the US? daydreaming: I’d like to work in NYC mebbes

I take the job markets are largely p.bouyant in london, US, even scotland’s had a lot of chat recently about a lack of skilled programmers

kenjataimu (cozen), Friday, 21 June 2013 14:44 (ten years ago) link

I think second-guessing the market in search of a career is a mug’s game tbh; best to do something you enjoy and find worthwhile

it was going down the first route that finds me here in first place

kenjataimu (cozen), Friday, 21 June 2013 14:47 (ten years ago) link

the skills are portable. the problem is finding a company that will get you a H1-B, which is the usual visa you need to work in the US in tech.

the way the wind is blowing, it might be a little easier in 5 years or so. one thing to bear in mind: the spouse of a H1-B is not eligible to work in the US.

ken otm.

caek, Friday, 21 June 2013 14:49 (ten years ago) link

one month passes...

python is absolutely the best language to learn programming in, and it happens to be useful in many practical situations including web programming.

any tips for a good python book for a beginner?

tpp, Monday, 12 August 2013 07:23 (ten years ago) link

http://www.greenteapress.com/thinkpython/thinkpython.html

free and good!

Clay, Monday, 12 August 2013 07:24 (ten years ago) link

for someone looking to learn programming from scratch i should say.

xp

tpp, Monday, 12 August 2013 07:25 (ten years ago) link

this looks perfect thanks

tpp, Monday, 12 August 2013 07:47 (ten years ago) link

i've been doing this! i've used that website, the codecademy python stuff, and the learn python the hard way website.

just sayin, Monday, 12 August 2013 08:46 (ten years ago) link

two months pass...

have to stick with javascript for course purposes, but no harm in learning the discipline in a structured/all-round way i spose

if i need someone to help me find out where all my fucking stuff has saved to nowe that im using eclipse, this could be that thread right? no pressure until tuesday 6pm...

unblog your plug (darraghmac), Monday, 14 October 2013 02:18 (ten years ago) link

there's usually a Eclipse Workspace (or something) directory that it makes. if you File > New > Project then it shows you the default location (or at least mine does, version 3.7.2)

Project > Properties > Resource also shows you for an open project

koogs, Monday, 14 October 2013 08:54 (ten years ago) link

Ta

unblog your plug (darraghmac), Monday, 14 October 2013 09:06 (ten years ago) link

You’re using Eclipse to write JavaScript? Why? It sounds like a PITA.

Allen (etaeoe), Monday, 14 October 2013 19:41 (ten years ago) link

four months pass...

oh, i get it now, ruby on rails is why every website looks and works like shit and why (because website) everyone wants ruby on rails 'developers'

web whatever point 0 is the worst

j., Sunday, 2 March 2014 03:59 (ten years ago) link

one year passes...

fed up now

After installing Windows 10 I seem to have automatically been given Visual Studio Community 2015, because I like to mess about in c++. Previously I was usuing VS express 2013 I think

First things first, I'm a very casual coder - I only write small dumb little games for myself or whatever, I'm not a pro.

So for some reason now nothing compiles, literally trying to compile a simple c++ file which has an #include "iostream" and a basic main function (for now) but nothing else, so it should just compile really easily yeah?

But consistantly being hit with "186 errors", sometimes more. They read along the lines :

variable "errno_t" is not a type name
explicit type is missing ('int' assumed)
(in crtdb.h file which I've not even mentioned in my code)
...and so on, none of the errors make sense in relation to the small code I've written

Internet can only suggest that
This looks like you are compiling against a mix of header files, with some from one compiler version and some from the other.

But I've uninstalled all other Visual Studio versions so I can't see how that's happening.

Any ideas ilx?

Drop soap, not bombs (Ste), Friday, 27 November 2015 14:24 (eight years ago) link

don't know about the windows compiler but gcc has flags that'll show you the compilation steps and / or save the files after going through the pre-processor, maybe that'll help.

(i've just re-installed VS 2010 on my vista laptop but haven't compiled anything with it yet)

koogs, Friday, 27 November 2015 14:42 (eight years ago) link

Finally, I deinstalled every little thing that had anything to do with VS, including registry entries. Seems to be working now

Drop soap, not bombs (Ste), Friday, 27 November 2015 18:35 (eight years ago) link

one year passes...

i've been making an effort to bring myself up to date with the new c++ specifications by reading a few books (meyers, alexandrescu). kind of blown away by how useful some of the new features are ('auto' has already saved me hours of my time) but also how complex the language has become.

tpp, Wednesday, 19 July 2017 05:29 (six years ago) link

eight months pass...

I've been reading/learning c# lately, from what I have gleamed so far it is extremely similar to Java but tailored obviously for Windows.Net

It's also losing me quite often, the maze of interfaces mixed with generics and delegates and whatnot other ways of designing object orientated code makes me think that I'm never going to fully conquer this one.

In space, pizza sends out for YOU (Ste), Wednesday, 18 April 2018 18:59 (six years ago) link

oh god don't confuse me, just about starting to get my head around some of the common java patterns

thomasintrouble, Wednesday, 18 April 2018 19:54 (six years ago) link

is Java still something worth pursueing these days, from a career perspective? I kinda bailed just before getting to know the advanced stuff, but it was useful for some modding programming.

Feel like cowering back into BASIC retro computer programming right now, for a procedural one last hit.

In space, pizza sends out for YOU (Ste), Wednesday, 18 April 2018 21:34 (six years ago) link

Android uses Java, so yes.

Meme Imfurst (Leee), Wednesday, 18 April 2018 21:35 (six years ago) link

C# syntax has improved quite a bit over the last few years and I think it's nicer to use than Java but tbh I don't have much Java experience

Colonel Poo, Wednesday, 18 April 2018 21:39 (six years ago) link

Java and C# are virtually interchangeable to me at this point. I say focus on whichever one you need for your current job and make up some silly side project to keep your toes in the water with the other one.

Embalming is a flirty business (DJP), Thursday, 19 April 2018 00:57 (six years ago) link


You must be logged in to post. Please either login here, or if you are not registered, you may register here.