C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 3rd, 2006, 04:45 AM
abi_theju abi_theju is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 1 abi_theju User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 25 m 13 sec
Reputation Power: 0
Help on projects

Hi all, I am new here

I recently started learning Win32 programming. I am very much confsed with the projects. I want to know how these projects work? What is their use? Many of the examples I have are based on these projects, I am only familiar with single .cpp files, but there are many cpp files in a single project. I need some help please.

Reply With Quote
  #2  
Old August 3rd, 2006, 06:07 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 1,001 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3Folding Points: 1003874 Folding Title: Super Ultimate Folder - Level 3
Time spent in forums: 6 Days 15 h 6 m 59 sec
Reputation Power: 6
Send a message via ICQ to Itsacon
If a program gets bigger, it may be easy to spread it out over multiple files, instead of having one cpp of thousands of lines. You might for example have seperate files for the user interface, the file handling, the logic, etc.
A project is a way to keep these tidy in your IDE, and make it easier to build the whole project (the IDE's compiler knows which files it has to compile).
__________________
This is my code. Is it not nifty?

"The biggest problem encountered while trying to design a system that was completely foolproof, was, that people tended to underestimate the ingenuity of complete fools."
---Douglas Adams


Join the Itsacon fanclub!    
Zero Tolerance: Spammers banned so far: 280

Reply With Quote
  #3  
Old August 3rd, 2006, 01:49 PM
daniel_g daniel_g is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2006
Posts: 60 daniel_g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 21 h 3 m 50 sec
Reputation Power: 3
Most Common use:
Have you ever seen the credits of a program? If so, you might have noticed a lot of programmers involved. To prevent getting confused about who did "this and that" on a file, they usually break it down into different pieces, and each programmer is assigned a different piece. Of course, the pieces don't run by themselves, so they need to be combined on a project.
As Itsacon implied, instead of having many pieces you could have a single file with hundreds of lines, making it very difficult to find and edit or debug stuff.

Reply With Quote
  #4  
Old August 7th, 2006, 05:17 PM
xreddawg909x xreddawg909x is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Posts: 91 xreddawg909x User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 1 h 27 m 20 sec
Reputation Power: 4
for example a program maybe broken up into 3 parts, headers/definitions/main driver program

for example :

file.h could include or basic prototypes or headers or structs
-----------------
#include<iostream>
#include<string>

using namespace std;

class two
{
public:
print();
two();
Private:
int one;
int two;
};
---------

definitions.cpp -
--------------
define your functions here...




---------------

main.cpp -
----------
#include "file.h" // be sure to include path if not in the same folder
#include "definitions.cpp"
int main()
{
print();

return 0;
}
---------

why do this you ask? say your program has 50 different functions, u could break it up into different .cpp files so debugging would make it worlds easier instead of scrolling all the way down 1,000+ lines of code to fix a missing semi colon

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Help on projects


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT