• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 08:49
CEST 14:49
KST 21:49
  • 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 - The Finalists14[ASL21] Ro16 Preview Pt1: Fresh Flow9[ASL21] Ro24 Preview Pt2: News Flash10[ASL21] Ro24 Preview Pt1: New Chaos0Team Liquid Map Contest #22 - Presented by Monster Energy21
Community News
2026 GSL Season 1 Qualifiers11Maestros of the Game 2 announced32026 GSL Tour plans announced11Weekly Cups (April 6-12): herO doubles, "Villains" prevail1MaNa leaves Team Liquid22
StarCraft 2
General
MaNa leaves Team Liquid 2026 GSL Tour plans announced Team Liquid Map Contest #22 - The Finalists Weekly Cups (April 6-12): herO doubles, "Villains" prevail Oliveira Would Have Returned If EWC Continued
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament GSL CK: More events planned pending crowdfunding 2026 GSL Season 1 Qualifiers Master Swan Open (Global Bronze-Master 2) SEL Doubles (SC Evo Bimonthly)
Strategy
Custom Maps
[D]RTS in all its shapes and glory <3 [A] Nemrods 1/4 players [M] (2) Frigid Storage
External Content
Mutation # 521 Memorable Boss The PondCast: SC2 News & Results Mutation # 520 Moving Fees Mutation # 519 Inner Power
Brood War
General
ASL21 General Discussion BGH Auto Balance -> http://bghmmr.eu/ Gypsy to Korea Pros React To: Tulbo in Ro.16 Group A Data needed
Tourneys
Escore Tournament StarCraft Season 2 [Megathread] Daily Proleagues [ASL21] Ro16 Group A [ASL21] Ro16 Group B
Strategy
Simple Questions, Simple Answers What's the deal with APM & what's its true value Any training maps people recommend? Fighting Spirit mining rates
Other Games
General Games
Nintendo Switch Thread General RTS Discussion Thread Battle Aces/David Kim RTS Megathread Stormgate/Frost Giant Megathread Starcraft Tabletop Miniature Game
Dota 2
The Story of Wings Gaming
League of Legends
G2 just beat GenG in First stand
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 Mafia Game Mode Feedback/Ideas TL Mafia Community Thread Five o'clock TL Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread Canadian Politics Mega-thread
Fan Clubs
The IdrA Fan Club
Media & Entertainment
Anime Discussion Thread [Req][Books] Good Fantasy/SciFi books [Manga] One Piece Movie Discussion!
Sports
2024 - 2026 Football Thread McBoner: A hockey love story Formula 1 Discussion Cricket [SPORT]
World Cup 2022
Tech Support
[G] How to Block Livestream Ads
TL Community
The Automated Ban List
Blogs
Reappraising The Situation T…
TrAiDoS
lurker extra damage testi…
StaticNine
Broowar part 2
qwaykee
Funny Nicknames
LUCKY_NOOB
Iranian anarchists: organize…
XenOsky
ASL S21 English Commentary…
namkraft
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2096 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
Poland17727 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
Hyrule19203 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
Spain18265 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
Spain18265 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
WardiTV Map Contest Tou…
11:00
Group D
WardiTV841
IndyStarCraft 257
TKL 241
Rex100
3DClanTV 60
Liquipedia
Sparkling Tuna Cup
10:00
Weekly #128 (TLMC 22 Edition)
herO vs PercivalLIVE!
TBD vs ByuN
CranKy Ducklings172
herO (SOOP)43
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 257
TKL 241
Rex 100
MindelVK 44
herO (SOOP) 43
Codebar 2
StarCraft: Brood War
Britney 33662
Calm 5668
Horang2 1817
ToSsGirL 1335
EffOrt 1001
NaDa 672
ggaemo 490
Mini 409
Mind 282
firebathero 247
[ Show more ]
BeSt 236
Soulkey 215
Last 197
Rush 170
Hyun 143
PianO 117
Killer 84
hero 55
[sc1f]eonzerg 49
Pusan 49
Sharp 48
Sea.KH 40
Movie 30
sSak 28
Shinee 25
yabsab 20
Hm[arnc] 20
soO 19
Noble 16
SilentControl 14
GoRush 12
IntoTheRainbow 12
Icarus 5
zelot 4
Dota 2
Gorgc5808
BananaSlamJamma30
Counter-Strike
zeus1776
x6flipin551
edward212
Super Smash Bros
Mew2King104
Heroes of the Storm
Khaldor303
Other Games
B2W.Neo2275
singsing1873
DeMusliM349
XaKoH 291
Mlord285
Pyrionflax210
Beastyqt41
Organizations
Dota 2
PGL Dota 2 - Main Stream12096
PGL Dota 2 - Secondary Stream1299
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• CranKy Ducklings SOOP7
• iHatsuTV 7
• Adnapsc2 6
• sooper7s
• Migwel
• LaughNgamezSOOP
• IndyKCrew
• Kozan
• intothetv
• AfreecaTV YouTube
StarCraft: Brood War
• FirePhoenix5
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Jankos2421
• TFBlade1249
• Nemesis533
Upcoming Events
Ladder Legends
2h 11m
IPSL
3h 11m
JDConan vs TBD
Aegong vs rasowy
BSL
6h 11m
StRyKeR vs rasowy
Artosis vs Aether
JDConan vs OyAji
Hawk vs izu
CranKy Ducklings
11h 11m
Replay Cast
20h 11m
Wardi Open
21h 11m
Afreeca Starleague
21h 11m
Bisu vs Ample
Jaedong vs Flash
Monday Night Weeklies
1d 3h
RSL Revival
1d 13h
Afreeca Starleague
1d 21h
Barracks vs Leta
Royal vs Light
[ Show More ]
WardiTV Map Contest Tou…
1d 22h
RSL Revival
2 days
Replay Cast
3 days
The PondCast
3 days
KCM Race Survival
3 days
WardiTV Map Contest Tou…
3 days
Replay Cast
4 days
Escore
4 days
RSL Revival
5 days
WardiTV Map Contest Tou…
5 days
Ladder Legends
6 days
uThermal 2v2 Circuit
6 days
BSL
6 days
Sparkling Tuna Cup
6 days
WardiTV Map Contest Tou…
6 days
Liquipedia Results

Completed

Escore Tournament S2: W3
RSL Revival: Season 4
NationLESS Cup

Ongoing

BSL Season 22
ASL Season 21
CSL 2026 SPRING (S20)
IPSL Spring 2026
KCM Race Survival 2026 Season 2
StarCraft2 Community Team League 2026 Spring
WardiTV TLMC #16
Nations Cup 2026
IEM Rio 2026
PGL Bucharest 2026
Stake Ranked Episode 1
BLAST Open Spring 2026
ESL Pro League S23 Finals
ESL Pro League S23 Stage 1&2
PGL Cluj-Napoca 2026
IEM Kraków 2026

Upcoming

Escore Tournament S2: W4
Acropolis #4
BSL 22 Non-Korean Championship
CSLAN 4
Kung Fu Cup 2026 Grand Finals
HSC XXIX
uThermal 2v2 2026 Main Event
2026 GSL S2
RSL Revival: Season 5
2026 GSL S1
XSE Pro League 2026
IEM Cologne Major 2026
Stake Ranked Episode 2
CS Asia Championships 2026
IEM Atlanta 2026
Asian Champions League 2026
PGL Astana 2026
BLAST Rivals Spring 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.