• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 03:06
CEST 09:06
KST 16:06
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Team Liquid Map Contest #22: Results and Winners7Code S Season 2 (2026): RO4 and Finals Preview12TL.net Map Contest #22 - Voting & Ladder Map Selection7Code S Season 2 (2026) - RO8 Preview5[ASL21] Finals Preview: Two Legacies21
Community News
Douyu Cup 2026: $20,000 Legends Event (June 26-28)8[BSL22] Non-Korean Championship from 13 to 28 June4Weekly Cups (May 25-31): Clem doubles, 2v2 circuit heads toward finale0StarCraft II 5.0.16 PTR Patch Notes may 26th156Weekly Cups (May 18-24): MaxPax wins doubles0
StarCraft 2
General
https://open.firstory.me/story/cmqeqsua206uq01ts7n TL Poll: How do you feel about the 5.0.16 PTR balance changes? RSL S6 finale at Blizzcon Oliveira Would Have Returned If EWC Continued Team Liquid Map Contest #22: Results and Winners
Tourneys
Douyu Cup 2026: $20,000 Legends Event (June 26-28) Maestros of The Game 2 announcement and schedule ! Sparkling Tuna Cup - Weekly Open Tournament Sea Duckling Open (Global, Bronze-Diamond) GSL Code S Season 2 (2026)
Strategy
[G] Having the right mentality to improve
Custom Maps
[D]RTS in all its shapes and glory <3
External Content
Mutation # 530 One For All The PondCast: SC2 News & Results Mutation # 529 Opportunities Unleashed Mutation # 528 Infection Detected
Brood War
General
Where is EffOrt? BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion vespene.gg — BW replays in browser Quality of life changes in BW that you will like ?
Tourneys
[Megathread] Daily Proleagues [ASL21] Grand Finals [BSL22] Grand Finals - Sunday 21:00 CEST Escore Tournament StarCraft Season 2
Strategy
Creating a full chart of Zerg builds Relatively freeroll strategies Why doesn't anyone use restoration? Any training maps people recommend?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread PC Games Sales Thread ZeroSpace Megathread
Dota 2
Looking for a Dota Mentor Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia
Community
General
US Politics Mega-thread Canadian Politics Mega-thread Russo-Ukrainian War Thread Trading/Investing Thread Things Aren’t Peaceful in Palestine
Fan Clubs
The HerO Fan Club! The herO Fan Club!
Media & Entertainment
Movie Discussion! [Req][Books] Good Fantasy/SciFi books [TV/BOOK] *SPOILERS* Game of Thrones Discussion [Manga] One Piece
Sports
2024 - 2026 Football Thread Formula 1 Discussion Cricket [SPORT] TeamLiquid Health and Fitness Initiative For 2023 NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Facing Challenges in Mobile App Development
TL Community
The Automated Ban List
Blogs
Does Workplace Frustration D…
TrAiDoS
An Exploration of th…
waywardstrategy
I'm an arrogant trash talke…
FlaShFTW
Gauntlet SC2: A Retrospectiv…
Ctone23
Why RTS gamers make better f…
gosubay
Customize Sidebar...

Website Feedback

Closed Threads



Active: 7847 users

The Big Programming Thread - Page 721

Forum Index > General Forum
Post a Reply
Prev 1 719 720 721 722 723 1032 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Manit0u
Profile Blog Joined August 2004
Poland17765 Posts
April 21 2016 21:30 GMT
#14401
On April 22 2016 06:14 Wrath wrote:
How to gain experience without job?


Try to contribute to some open source projects?
Write something on your own?
Become a wizard at a MUD? (I did that, awesome experience)
Time is precious. Waste it wisely.
tofucake
Profile Blog Joined October 2009
Hyrule19221 Posts
April 22 2016 12:40 GMT
#14402
Intern, OSS, Freelance
Liquipediaasante sana squash banana
waffelz
Profile Blog Joined June 2012
Germany711 Posts
Last Edited: 2016-04-24 21:10:01
April 24 2016 20:40 GMT
#14403
Uhm... I might be totally blind because I already code for a long time now, but whats wrong with this:


#pragma once
#include "Printer.h"
#include "Color.h"
#include "Printjob.h"
#include <String>
#include <vector>
#include <iostream>
#include <ctime>
#include <chrono>
#include <thread>
class Panel
{
private:
someatributes


Printer* printer;
Color* color; //<- line which screws me
};


Visual Studio keeps telling me that in the marked line there is no type specified and no ";" in front of the "*" and I cant figure out why... What is the obvious thing I miss here? I suggest the error lies somewhere else and the message is just misleading, but I don't know where since the color.cpp/.h only contains trivial code. If I leave the line out, everything builds fine.
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
CoughingHydra
Profile Blog Joined May 2012
177 Posts
Last Edited: 2016-04-24 21:08:53
April 24 2016 21:06 GMT
#14404
Shouldn't class end with ";" ? I mean
class Panel
{
...
}; // <- here
zatic
Profile Blog Joined September 2007
Zurich15365 Posts
Last Edited: 2016-04-24 21:11:30
April 24 2016 21:10 GMT
#14405
On April 25 2016 06:06 CoughingHydra wrote:
Shouldn't class end with ";" ? I mean
class Panel
{
...
}; // <- here

You really can't find that out for yourself? ...
Never mind thought you were asking a genuine question.
ModeratorI know Teamliquid is known as a massive building
waffelz
Profile Blog Joined June 2012
Germany711 Posts
April 24 2016 21:10 GMT
#14406
On April 25 2016 06:06 CoughingHydra wrote:
Shouldn't class end with ";" ? I mean
class Panel
{
...
}; // <- here


I just failed to copy that since there is quite some code in between. Fixed it in my example.
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
spinesheath
Profile Blog Joined June 2009
Germany8679 Posts
April 24 2016 21:18 GMT
#14407
On April 25 2016 05:40 waffelz wrote:
Visual Studio keeps telling me that in the marked line there is no type specified and no ";" in front of the "*" and I cant figure out why... What is the obvious thing I miss here? I suggest the error lies somewhere else and the message is just misleading, but I don't know where since the color.cpp/.h only contains trivial code. If I leave the line out, everything builds fine.

Can you use Color* anywhere else? Maybe the error is somewhere in color.h.
If you have a good reason to disagree with the above, please tell me. Thank you.
waffelz
Profile Blog Joined June 2012
Germany711 Posts
Last Edited: 2016-04-24 21:20:47
April 24 2016 21:20 GMT
#14408
Well... if I swap them around I can use Panel* but no longer Color* ^^... time to crawl through the whole code.
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
CoughingHydra
Profile Blog Joined May 2012
177 Posts
Last Edited: 2016-04-24 21:27:53
April 24 2016 21:22 GMT
#14409
On April 25 2016 06:10 waffelz wrote:
Show nested quote +
On April 25 2016 06:06 CoughingHydra wrote:
Shouldn't class end with ";" ? I mean
class Panel
{
...
}; // <- here


I just failed to copy that since there is quite some code in between. Fixed it in my example.

What about
 #include <String>
.
Try changing to lower case <string>.

EDIT:
Never mind, I forgot this is visual which I know nothing about, I'm using g++...
waffelz
Profile Blog Joined June 2012
Germany711 Posts
April 24 2016 21:25 GMT
#14410
On April 25 2016 06:22 CoughingHydra wrote:
Show nested quote +
On April 25 2016 06:10 waffelz wrote:
On April 25 2016 06:06 CoughingHydra wrote:
Shouldn't class end with ";" ? I mean
class Panel
{
...
}; // <- here


I just failed to copy that since there is quite some code in between. Fixed it in my example.

What about
 #include <String>
.
Try changing to lower case <string>.


No luck. Changed it anyway though. To much java lately.
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
waffelz
Profile Blog Joined June 2012
Germany711 Posts
Last Edited: 2016-04-24 21:38:08
April 24 2016 21:32 GMT
#14411
Kind of found the error. I had #include "Panel.h" in color.h and printer.h, without it it runs fine HOWEVER, I need Color and Printer to know Panel as well and shouldn’t pragma once fix such problems? Gonne try it with #ifndef

EDIT: Nope, the errors get even weirder lol
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
Khalum
Profile Joined September 2010
Austria831 Posts
April 24 2016 22:04 GMT
#14412
You don't really need to include anything here if you're just using pointers. Just use forward declaration for Printer and Color and include the headers in you cpp. Maybe that actually fixes your issues too.
Shield
Profile Blog Joined August 2009
Bulgaria4824 Posts
April 24 2016 23:04 GMT
#14413
#pragma once seems to work fine for me.

+ Show Spoiler +

Panel.h
+ Show Spoiler +


#pragma once

#include "Colour.h"
#include "Printer.h"

class Panel
{
public:
Panel();
~Panel();

private:
Printer* _printer;
Colour* _colour;
};



Printer.h
+ Show Spoiler +


#pragma once

#include "Colour.h"
#include "Panel.h"

class Printer
{
public:
Printer();
~Printer();
};



Colour.h
+ Show Spoiler +


#pragma once

#include "Printer.h"
#include "Panel.h"

class Colour
{
public:
Colour();
~Colour();
};




Why are you using raw pointers anyway?
Acrofales
Profile Joined August 2010
Spain18311 Posts
Last Edited: 2016-04-25 00:30:05
April 25 2016 00:27 GMT
#14414
On April 25 2016 05:40 waffelz wrote:
Uhm... I might be totally blind because I already code for a long time now, but whats wrong with this:


#pragma once
#include "Printer.h"
#include "Color.h"
#include "Printjob.h"
#include <String>
#include <vector>
#include <iostream>
#include <ctime>
#include <chrono>
#include <thread>
class Panel
{
private:
someatributes


Printer* printer;
Color* color; //<- line which screws me
};


Visual Studio keeps telling me that in the marked line there is no type specified and no ";" in front of the "*" and I cant figure out why... What is the obvious thing I miss here? I suggest the error lies somewhere else and the message is just misleading, but I don't know where since the color.cpp/.h only contains trivial code. If I leave the line out, everything builds fine.


Given that none of the suggestions so far worked, I'm going to suggest there is something in someatributes that is wrong. For starters, its spelling

Other than that, my main expectation is that there's something wrong in printer, rather than color. Did you try switching those two statements?

Note that the last time I coded c++ is a while back, but it doesn't look like the error is in the code you posted.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
April 25 2016 02:31 GMT
#14415
you really need to post all the code for the Color class because that's probably where the error is given that it doesn't understand that the class exists

did you add Color.cpp to your makefile?
There is no one like you in the universe.
waffelz
Profile Blog Joined June 2012
Germany711 Posts
Last Edited: 2016-04-25 05:26:52
April 25 2016 05:26 GMT
#14416
On April 25 2016 08:04 Shield wrote:
#pragma once seems to work fine for me.

+ Show Spoiler +

Panel.h
+ Show Spoiler +


#pragma once

#include "Colour.h"
#include "Printer.h"

class Panel
{
public:
Panel();
~Panel();

private:
Printer* _printer;
Colour* _colour;
};



Printer.h
+ Show Spoiler +


#pragma once

#include "Colour.h"
#include "Panel.h"

class Printer
{
public:
Printer();
~Printer();
};



Colour.h
+ Show Spoiler +


#pragma once

#include "Printer.h"
#include "Panel.h"

class Colour
{
public:
Colour();
~Colour();
};




Why are you using raw pointers anyway?

Because of reasons far beyond all human comprehension. + Show Spoiler +
(Mostly because of the retarded circumstances of this assignment and because of my prof )



On April 25 2016 11:31 Blisse wrote:
you really need to post all the code for the Color class because that's probably where the error is given that it doesn't understand that the class exists

did you add Color.cpp to your makefile?

At the time I was working on windows.

Thanks for all the help, the problem remains a mystery... My last solution was to transfer the whole project to my laptop where everything build fine while still giving the same error on my desktop. Now after getting up, I tried my desktop again because I was to tired to remember having switched to my laptop AND EVERYTHING WOKRS?! The original project before the transfer as well as the only slightly modified version from my laptop.
Either it was too close to midnight or I am starting to lose my mind. It just doesn’t make sense and now I am really pissed off, having lost multiple hours on an apparently non-existent issue.
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
WolfintheSheep
Profile Joined June 2011
Canada14127 Posts
April 25 2016 06:40 GMT
#14417
On April 25 2016 14:26 waffelz wrote:
Show nested quote +
On April 25 2016 08:04 Shield wrote:
#pragma once seems to work fine for me.

+ Show Spoiler +

Panel.h
+ Show Spoiler +


#pragma once

#include "Colour.h"
#include "Printer.h"

class Panel
{
public:
Panel();
~Panel();

private:
Printer* _printer;
Colour* _colour;
};



Printer.h
+ Show Spoiler +


#pragma once

#include "Colour.h"
#include "Panel.h"

class Printer
{
public:
Printer();
~Printer();
};



Colour.h
+ Show Spoiler +


#pragma once

#include "Printer.h"
#include "Panel.h"

class Colour
{
public:
Colour();
~Colour();
};




Why are you using raw pointers anyway?

Because of reasons far beyond all human comprehension. + Show Spoiler +
(Mostly because of the retarded circumstances of this assignment and because of my prof )



Show nested quote +
On April 25 2016 11:31 Blisse wrote:
you really need to post all the code for the Color class because that's probably where the error is given that it doesn't understand that the class exists

did you add Color.cpp to your makefile?

At the time I was working on windows.

Thanks for all the help, the problem remains a mystery... My last solution was to transfer the whole project to my laptop where everything build fine while still giving the same error on my desktop. Now after getting up, I tried my desktop again because I was to tired to remember having switched to my laptop AND EVERYTHING WOKRS?! The original project before the transfer as well as the only slightly modified version from my laptop.
Either it was too close to midnight or I am starting to lose my mind. It just doesn’t make sense and now I am really pissed off, having lost multiple hours on an apparently non-existent issue.

You're officially a programmer now.
Average means I'm better than half of you.
waffelz
Profile Blog Joined June 2012
Germany711 Posts
April 25 2016 07:04 GMT
#14418
On April 25 2016 15:40 WolfintheSheep wrote:
You're officially a programmer now.


haha, yeah. That the error is seemingly gone without reason is almost worse now lol.... I have a really hard time accepting that the compiler just had flatulence. There HAS to be a reason!
[image loading]
RIP "The big travis CS degree thread", taken from us too soon | Honourable forum princess, defended by Rebs-approved white knights
Khalum
Profile Joined September 2010
Austria831 Posts
Last Edited: 2016-04-25 09:30:27
April 25 2016 09:29 GMT
#14419
You should really reconsider your way of using #includes. The way it looks every header includes every header. That's not how it should be done at all. Even if you use #pragma once.
Acrofales
Profile Joined August 2010
Spain18311 Posts
April 25 2016 10:31 GMT
#14420
On April 25 2016 16:04 waffelz wrote:
Show nested quote +
On April 25 2016 15:40 WolfintheSheep wrote:
You're officially a programmer now.


haha, yeah. That the error is seemingly gone without reason is almost worse now lol.... I have a really hard time accepting that the compiler just had flatulence. There HAS to be a reason!
[image loading]

Could be that you forgot to call "make clean". I know that has cost me headaches worth of debugging...

But yes, I think every programmer worth his salt has spent hours being frustrated at a problem, deep into the night. And the next morning it turns out that the problem was completely trivial to solve, and you do it in 2 lines of code and 3 minutes. Feeling both victorious and relieved, as well as incredibly frustrated at the same time.
Prev 1 719 720 721 722 723 1032 Next
Please log in or register to reply.
Live Events Refresh
Next event in 3h 54m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 90
ProTech87
StarCraft: Brood War
Shuttle 4357
Rain 3037
GuemChi 2134
actioN 443
Leta 332
Mind 67
HiyA 52
Killer 31
ZergMaN 23
soO 16
[ Show more ]
NotJumperer 16
Nal_rA 15
Sharp 11
Icarus 8
Britney 0
Dota 2
NeuroSwarm127
League of Legends
JimRising 796
Super Smash Bros
Mew2King127
Other Games
summit1g8235
WinterStarcraft693
Happy282
C9.Mang0265
Dewaltoss26
RuFF_SC221
Organizations
Dota 2
PGL Dota 2 - Secondary Stream1654
Other Games
gamesdonequick572
StarCraft: Brood War
lovetv 7
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH255
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• iopq 5
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Lourlo2286
Upcoming Events
Wardi Open
3h 54m
OSC
16h 54m
Replay Cast
2 days
The PondCast
3 days
Replay Cast
3 days
OSC
3 days
CranKy Ducklings
4 days
BSL22 NKC (BSL vs China)
5 days
XuanXuan vs Jaystar
Mihu vs Messiah
eOnzErG vs Dewalt
Bonyth vs Jaystar
TerrOr vs Messiah
XuanXuan vs Mihu
eOnzErG vs Jaystar
BSL22 NKC (BSL vs China)
6 days
Dewalt vs Messiah
Bonyth vs Mihu
TerrOr vs XuanXuan
eOnzErG vs Messiah
Jaystar vs Mihu
Dewalt vs XuanXuan
Bonyth vs TerrOr
Liquipedia Results

Completed

Acropolis #4 - GSB
uThermal 2v2 2026 Main Event
Heroes Pulsing #1

Ongoing

IPSL Spring 2026
KCM Race Survival 2026 Season 2
Acropolis #4
CSCL: Masked Kings S4
YSL S3
BSL 22 Non-Korean Championship
SCTL 2026 Spring
Maestros of the Game 2
WardiTV Spring 2026
Murky Cup 2026
Heroes Pulsing #2
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
Asian Champions League 2026
IEM Atlanta 2026
PGL Astana 2026
BLAST Rivals Spring 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1

Upcoming

CSLAN 4
Blizzard Classic Cup 2026
Kung Fu Cup 2026 Grand Finals
RSL Revival: Season 6
CranK Gathers Season 4: BW vs SC2 Team League
HSC XXIX
Douyu Cup 2026
BCC 2026
Heroes Pulsing #3
BLAST Open Fall 2026
Esports World Cup 2026
BLAST Bounty Summer 2026
BLAST Bounty Summer Qual
Stake Ranked Episode 3
XSE Pro League 2026
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2026 TLnet. All Rights Reserved.