Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Chapter 8 Drill 1
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Aiden  
View profile  
 More options Mar 7 2011, 11:00 am
From: Aiden <daniel.e.hog...@gmail.com>
Date: Mon, 7 Mar 2011 08:00:11 -0800 (PST)
Local: Mon, Mar 7 2011 11:00 am
Subject: Chapter 8 Drill 1
I understand what I need to do, but I'm having a bit of difficulty
grasping how to do it.
So far I really just put what it told me so I have my.cpp calling
"std_lib_facilities.h" and "my.h" and use.cpp calling "my.h", but I
really just don't know where to go from here.

Anyone have tips on where to go/what to do?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aiden  
View profile  
 More options Mar 20 2011, 3:54 pm
From: Aiden <daniel.e.hog...@gmail.com>
Date: Sun, 20 Mar 2011 12:54:23 -0700 (PDT)
Local: Sun, Mar 20 2011 3:54 pm
Subject: Re: Chapter 8 Drill 1
Sorry if this is frowned upon, but I'm bumping this to try and get
help.

On Mar 7, 11:00 am, Aiden <daniel.e.hog...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay x  
View profile  
 More options Mar 20 2011, 8:00 pm
From: Jay x <jaydo...@gmail.com>
Date: Sun, 20 Mar 2011 20:00:35 -0400
Local: Sun, Mar 20 2011 8:00 pm
Subject: Re: Chapter 8 Drill 1

Are you getting an error message?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Daniel Hogue  
View profile  
 More options Mar 21 2011, 1:32 am
From: Daniel Hogue <daniel.e.hog...@gmail.com>
Date: Mon, 21 Mar 2011 00:32:27 -0500
Local: Mon, Mar 21 2011 1:32 am
Subject: Re: Chapter 8 Drill 1

No I just don't have anything to do yet. I don't know where to start really.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jay x  
View profile  
 More options Mar 21 2011, 2:45 am
From: Jay x <jaydo...@gmail.com>
Date: Mon, 21 Mar 2011 02:45:02 -0400
Local: Mon, Mar 21 2011 2:45 am
Subject: Re: Chapter 8 Drill 1

hmm well this is what I did:

my.h file contains two function prototypes and an extern decleration to
bring foo into scope.
//------------------------------------ my.h
------------------------------------------
extern int foo;
void print_foo();
void print(int);
//------------------------------------ my.h
------------------------------------------

my.cpp contains the implementation of the functions print_foo() and
print(int).
//------------------------------------ my.cpp
------------------------------------------
#include "std_lib_facilities.h"
#include "my.h"

void print_foo()
{
   cout << foo << endl;

}

void print(int i)
{
   cout << i << endl;
}

//------------------------------------ my.cpp
------------------------------------------

use.cpp will have the main method
//------------------------------------ use.cpp
-----------------------------------------
#include "my.h"

int main()
{
   foo = 7;
   print_foo();
   print(99);

   return 0;

}

//------------------------------------ use.cpp
-----------------------------------------

You also need to declare foo (int foo;) somewhere, I chose to declare it on
the last line of std_lib_facilities.h and then removed it after I verified
it compiles and runs.

If you're on linux you can use this command to compile and run: g++ my.cpp
use.cpp -o drill_1 ; ./drill_1

On Mon, Mar 21, 2011 at 1:32 AM, Daniel Hogue <daniel.e.hog...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aiden  
View profile  
 More options Mar 21 2011, 10:06 am
From: Aiden <daniel.e.hog...@gmail.com>
Date: Mon, 21 Mar 2011 07:06:30 -0700 (PDT)
Local: Mon, Mar 21 2011 10:06 am
Subject: Re: Chapter 8 Drill 1
Oh.. ok, I thought we couldn't use std_lib_facilities or anything like
that, haha I was so confused.

Thanks.

On Mar 21, 1:45 am, Jay x <jaydo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Aiden  
View profile  
 More options Mar 21 2011, 10:53 am
From: Aiden <daniel.e.hog...@gmail.com>
Date: Mon, 21 Mar 2011 07:53:43 -0700 (PDT)
Local: Mon, Mar 21 2011 10:53 am
Subject: Re: Chapter 8 Drill 1
Wow, I feel dumb, I didn't even notice that it said to include that.
Gah, well, that's my fault.

On Mar 21, 9:06 am, Aiden <daniel.e.hog...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »