• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 15:57
CET 21:57
KST 05:57
  • 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
ByuL: The Forgotten Master of ZvT27Behind the Blue - Team Liquid History Book19Clem wins HomeStory Cup 289HomeStory Cup 28 - Info & Preview13Rongyi Cup S3 - Preview & Info8
Community News
Weekly Cups (Feb 16-22): MaxPax doubles0Weekly Cups (Feb 9-15): herO doubles up2ACS replaced by "ASL Season Open" - Starts 21/0243LiuLi Cup: 2025 Grand Finals (Feb 10-16)46Weekly Cups (Feb 2-8): Classic, Solar, MaxPax win2
StarCraft 2
General
How do you think the 5.0.15 balance patch (Oct 2025) for StarCraft II has affected the game? ByuL: The Forgotten Master of ZvT Oliveira Would Have Returned If EWC Continued Behind the Blue - Team Liquid History Book Weekly Cups (Feb 16-22): MaxPax doubles
Tourneys
StarCraft Evolution League (SC Evo Biweekly) Sea Duckling Open (Global, Bronze-Diamond) PIG STY FESTIVAL 7.0! (19 Feb - 1 Mar) Sparkling Tuna Cup - Weekly Open Tournament How do the "codes" work in GSL?
Strategy
Custom Maps
Map Editor closed ? [A] Starcraft Sound Mod
External Content
Mutation # 514 Ulnar New Year The PondCast: SC2 News & Results Mutation # 513 Attrition Warfare Mutation # 512 Overclocked
Brood War
General
BGH Auto Balance -> http://bghmmr.eu/ ACS replaced by "ASL Season Open" - Starts 21/02 TvZ is the most complete match up CasterMuse Youtube A cwal.gg Extension - Easily keep track of anyone
Tourneys
Escore Tournament StarCraft Season 1 [Megathread] Daily Proleagues [LIVE] [S:21] ASL Season Open Day 1 Small VOD Thread 2.0
Strategy
Fighting Spirit mining rates Simple Questions, Simple Answers Zealot bombing is no longer popular? Current Meta
Other Games
General Games
Beyond All Reason Nintendo Switch Thread Battle Aces/David Kim RTS Megathread New broswer game : STG-World Diablo 2 thread
Dota 2
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 Mafia Game Mode Feedback/Ideas TL Mafia Community Thread
Community
General
US Politics Mega-thread Mexico's Drug War Russo-Ukrainian War Thread Canadian Politics Mega-thread Ask and answer stupid questions here!
Fan Clubs
The IdrA Fan Club The herO Fan Club!
Media & Entertainment
[Req][Books] Good Fantasy/SciFi books [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion TL MMA Pick'em Pool 2013
World Cup 2022
Tech Support
TL Community
The Automated Ban List
Blogs
ASL S21 English Commentary…
namkraft
Inside the Communication of …
TrAiDoS
My 2025 Magic: The Gathering…
DARKING
Life Update and thoughts.
FuDDx
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1365 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
Poland17671 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
Hyrule19193 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
Zurich15362 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
Spain18219 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
Spain18219 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 12h 3m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 491
elazer 258
Harstem 225
UpATreeSC 99
JuggernautJason58
goblin 24
ForJumy 12
Livibee 1
StarCraft: Brood War
Britney 12406
Shuttle 362
NaDa 9
Counter-Strike
tarik_tv4996
Fnx 2612
fl0m1743
Super Smash Bros
Mew2King88
Heroes of the Storm
Liquid`Hasu453
Other Games
Grubby6385
FrodaN2569
Beastyqt460
shahzam434
ToD178
mouzStarbuck173
ArmadaUGS169
C9.Mang0145
QueenE124
TKL 115
Dewaltoss67
minikerr4
Organizations
Counter-Strike
PGL508
Other Games
BasetradeTV97
StarCraft 2
angryscii 28
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• davetesta17
• Reevou 2
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• blackmanpl 31
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• masondota2770
• WagamamaTV437
League of Legends
• TFBlade643
Other Games
• imaqtpie1153
• Shiphtur263
Upcoming Events
Replay Cast
12h 3m
CasterMuse Showmatch
12h 3m
Light vs Queen
WardiTV Winter Champion…
15h 3m
The PondCast
1d 13h
Replay Cast
2 days
Korean StarCraft League
3 days
CranKy Ducklings
3 days
SC Evo Complete
3 days
Replay Cast
4 days
Sparkling Tuna Cup
4 days
[ Show More ]
uThermal 2v2 Circuit
4 days
Replay Cast
5 days
Wardi Open
5 days
Replay Cast
6 days
Liquipedia Results

Completed

Proleague 2026-02-22
LiuLi Cup: 2025 Grand Finals
Underdog Cup #3

Ongoing

KCM Race Survival 2026 Season 1
Acropolis #4 - TS5
Jeongseon Sooper Cup
Spring Cup 2026
WardiTV Winter 2026
PiG Sty Festival 7.0
Nations Cup 2026
PGL Cluj-Napoca 2026
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter Qual
eXTREMESLAND 2025
SL Budapest Major 2025

Upcoming

[S:21] ASL SEASON OPEN 2nd Round
[S:21] ASL SEASON OPEN 2nd Round Qualifier
Acropolis #4 - TS6
Acropolis #4
IPSL Spring 2026
HSC XXIX
uThermal 2v2 2026 Main Event
Bellum Gens Elite Stara Zagora 2026
RSL Revival: Season 4
PGL Astana 2026
BLAST Rivals Spring 2026
CCT Season 3 Global Finals
FISSURE Playground #3
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
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.