• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 11:25
CET 17:25
KST 01:25
  • 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
RSL Season 3 - RO16 Groups C & D Preview0RSL Season 3 - RO16 Groups A & B Preview2TL.net Map Contest #21: Winners12Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13
Community News
[TLMC] Fall/Winter 2025 Ladder Map Rotation12Weekly Cups (Nov 3-9): Clem Conquers in Canada4SC: Evo Complete - Ranked Ladder OPEN ALPHA8StarCraft, SC2, HotS, WC3, Returning to Blizzcon!45$5,000+ WardiTV 2025 Championship7
StarCraft 2
General
Mech is the composition that needs teleportation t RotterdaM "Serral is the GOAT, and it's not close" RSL Season 3 - RO16 Groups C & D Preview [TLMC] Fall/Winter 2025 Ladder Map Rotation TL.net Map Contest #21: Winners
Tourneys
RSL Revival: Season 3 Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest Tenacious Turtle Tussle Master Swan Open (Global Bronze-Master 2)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
SnOw's ASL S20 Finals Review FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion What happened to TvZ on Retro? Brood War web app to calculate unit interactions
Tourneys
[Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL21] RO32 Group D - Sunday 21:00 CET [BSL21] RO32 Group C - Saturday 21:00 CET
Strategy
PvZ map balance Current Meta Simple Questions, Simple Answers How to stay on top of macro?
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread Clair Obscur - Expedition 33 Beyond All Reason
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
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
Things Aren’t Peaceful in Palestine US Politics Mega-thread Russo-Ukrainian War Thread Artificial Intelligence Thread Canadian Politics Mega-thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread Formula 1 Discussion NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Dyadica Gospel – a Pulp No…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Customize Sidebar...

Website Feedback

Closed Threads



Active: 2131 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
Poland17432 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
Hyrule19152 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
Zurich15355 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
Spain18117 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
Spain18117 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
PSISTORM Gaming Misc
15:55
FSL teamleague CNvsASH, ASHvRR
Freeedom13
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 306
LamboSC2 118
mcanning 69
MindelVK 15
EmSc Tv 11
StarCraft: Brood War
Britney 30168
Rain 2752
Horang2 1410
Jaedong 998
Shuttle 451
Stork 395
PianO 259
firebathero 221
Barracks 164
LaStScan 99
[ Show more ]
Shinee 98
ggaemo 82
Leta 80
Hyun 69
soO 39
Rock 32
Shine 29
Mong 28
JYJ25
ToSsGirL 23
HiyA 21
Movie 15
zelot 11
Dewaltoss 10
Oystein7
Dota 2
Gorgc6149
qojqva1841
Dendi1061
XcaliburYe123
LuMiX1
Counter-Strike
ScreaM961
Heroes of the Storm
Khaldor312
Liquid`Hasu172
Other Games
B2W.Neo1935
Mlord411
Beastyqt257
DeMusliM256
Lowko255
Hui .193
Fuzer 171
Trikslyr27
febbydoto6
Organizations
Dota 2
PGL Dota 2 - Main Stream7590
PGL Dota 2 - Secondary Stream4521
Other Games
EGCTV633
StarCraft 2
EmSc Tv 11
EmSc2Tv 11
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• StrangeGG 71
• HeavenSC 26
• OhrlRock 1
• IndyKCrew
• AfreecaTV YouTube
• sooper7s
• intothetv
• Kozan
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• Michael_bg 5
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 1840
• Ler52
League of Legends
• Nemesis2810
Other Games
• WagamamaTV345
• Shiphtur62
Upcoming Events
IPSL
36m
ZZZero vs rasowy
Napoleon vs KameZerg
OSC
2h 36m
BSL 21
3h 36m
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
17h 36m
RSL Revival
17h 36m
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
19h 36m
Cure vs herO
Reynor vs TBD
WardiTV Korean Royale
19h 36m
BSL 21
1d 3h
JDConan vs Semih
Dragon vs Dienmax
Tech vs NewOcean
TerrOr vs Artosis
IPSL
1d 3h
Dewalt vs WolFix
eOnzErG vs Bonyth
Replay Cast
1d 6h
[ Show More ]
Wardi Open
1d 19h
Monday Night Weeklies
2 days
WardiTV Korean Royale
2 days
BSL: GosuLeague
3 days
The PondCast
3 days
Replay Cast
4 days
RSL Revival
4 days
BSL: GosuLeague
5 days
RSL Revival
5 days
WardiTV Korean Royale
5 days
RSL Revival
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-14
Stellar Fest: Constellation Cup
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
CSCL: Masked Kings S3
SLON Tour Season 2
RSL Revival: Season 3
META Madness #9
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025

Upcoming

BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
IEM Kraków 2026
BLAST Bounty Winter 2026
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
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 © 2025 TLnet. All Rights Reserved.