• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 14:30
CEST 20:30
KST 03:30
  • 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
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL63Weekly Cups (June 23-29): Reynor in world title form?13FEL Cracov 2025 (July 27) - $8000 live event21Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
Program: SC2 / XSplit / OBS Scene Switcher The SCII GOAT: A statistical Evaluation Statistics for vetoed/disliked maps Weekly Cups (June 23-29): Reynor in world title form? PiG Sty Festival #5: Playoffs Preview + Groups Recap
Tourneys
RSL: Revival, a new crowdfunded tournament series Sparkling Tuna Cup - Weekly Open Tournament WardiTV Mondays FEL Cracov 2025 (July 27) - $8000 live event Korean Starcraft League Week 77
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
Flash Announces Hiatus From ASL BW General Discussion Player “Jedi” cheat on CSL SC uni coach streams logging into betting site Practice Partners (Official)
Tourneys
The Casual Games of the Week Thread CSL Xiamen International Invitational [BSL20] Grand Finals - Sunday 20:00 CET [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Path of Exile Stormgate/Frost Giant Megathread Nintendo Switch Thread What do you want from future RTS games? 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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Summer Games Done Quick 2025! Trading/Investing Thread Things Aren’t Peaceful in Palestine
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
Formula 1 Discussion 2024 - 2025 Football Thread NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 572 users

The Big Programming Thread - Page 721

Forum Index > General Forum
Post a Reply
Prev 1 719 720 721 722 723 1031 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
Poland17243 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
Hyrule19031 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
Zurich15325 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
Spain17971 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
Spain17971 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 1031 Next
Please log in or register to reply.
Live Events Refresh
BSL: ProLeague
18:00
Grand Finals - bo9
Dewalt vs Bonyth
ZZZero.O250
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mouzHeroMarine 724
BRAT_OK 124
MindelVK 36
StarCraft: Brood War
Bisu 866
EffOrt 427
Mini 304
ZZZero.O 250
Soma 249
Hyuk 180
TY 109
ToSsGirL 67
Terrorterran 19
HiyA 14
[ Show more ]
LuMiX 6
Stormgate
BeoMulf201
NightEnD6
Dota 2
qojqva3080
League of Legends
Grubby2912
Dendi2071
Counter-Strike
fl0m1565
Super Smash Bros
Mew2King157
Chillindude50
Westballz29
Heroes of the Storm
Khaldor913
Liquid`Hasu505
Other Games
Gorgc3139
FrodaN2575
B2W.Neo767
mouzStarbuck269
KnowMe110
elazer73
Organizations
Other Games
gamesdonequick41245
EGCTV1698
StarCraft 2
angryscii 22
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 19 non-featured ]
StarCraft 2
• Adnapsc2 30
• HeavenSC 28
• maralekos12
• IndyKCrew
• sooper7s
• AfreecaTV YouTube
• Migwel
• intothetv
• LaughNgamezSOOP
• Kozan
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• C_a_k_e 4117
• Ler174
League of Legends
• masondota2531
Other Games
• imaqtpie1943
• Shiphtur683
• WagamamaTV373
Upcoming Events
Wardi Open
16h 30m
Monday Night Weeklies
21h 30m
Replay Cast
1d 5h
Sparkling Tuna Cup
1d 15h
WardiTV European League
1d 21h
MaNa vs sebesdes
Mixu vs Fjant
ByuN vs HeRoMaRinE
ShoWTimE vs goblin
Gerald vs Babymarine
Krystianer vs YoungYakov
PiGosaur Monday
2 days
The PondCast
2 days
WardiTV European League
2 days
Jumy vs NightPhoenix
Percival vs Nicoract
ArT vs HiGhDrA
MaxPax vs Harstem
Scarlett vs Shameless
SKillous vs uThermal
Replay Cast
3 days
RSL Revival
3 days
ByuN vs SHIN
Clem vs Reynor
[ Show More ]
Replay Cast
4 days
RSL Revival
4 days
Classic vs Cure
FEL
4 days
RSL Revival
5 days
FEL
5 days
FEL
5 days
Sparkling Tuna Cup
6 days
RSL Revival
6 days
FEL
6 days
Liquipedia Results

Completed

BSL 2v2 Season 3
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
CSL Xiamen Invitational
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
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.