473,406 Members | 2,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

get(char*, num, delim) question

Hello,

I've got a program that is reading in a data file of 25 lines. Here is
an example of the first two lines:

sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0

In my program, I need to read in each line, BUT, I need to build a
different object based upon the characters in the first field. So, I
need to GET the first characters. And here's where I'm doing something
incorrectly. This is what I've got so far:

char readInFirstChars(ifstream &fin) {
char *first;
fin.get(first, 3, '/');
cout << first; // debugging line to see what is output
}
return first;
}

The above code give me a compile error stating:
" invalid conversion from `char*' to `char'"

I tried the get function with the single character parameter like such:
char first;
fin.get(first);
cout << first << endl;
return first;

and it works fine. So I must be doing something wrong with the pointer.

The other tangent problem I'm having with this how to properly cycle
through the input file so it only reads in the first field and then
moves on to the next line. I tried
while (fin.good()) {
char first;
fin.get(first);
cout << first << endl;
}
return first;

Which looped, but it output the entire file. I only need the first
field. If the first field were only one character, then the only
problem I would be dealing with is the loop problem, but since it's
either 1 or 2 characters (with the end delimeter being '/'), I'm also
dealing with the get() problem.

Thanks for any advice.

Frank
Jul 22 '05 #1
12 2016

"Francis Bell" <ph**********@charter.net> wrote in message
news:10*************@corp.supernews.com...
Hello,

I've got a program that is reading in a data file of 25 lines. Here is
an example of the first two lines:

sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0

In my program, I need to read in each line, BUT, I need to build a
different object based upon the characters in the first field. So, I
need to GET the first characters. And here's where I'm doing something
incorrectly. This is what I've got so far:

char readInFirstChars(ifstream &fin) {
char *first;
fin.get(first, 3, '/');
cout << first; // debugging line to see what is output
}
return first;
}

The above code give me a compile error stating:
" invalid conversion from `char*' to `char'"

I tried the get function with the single character parameter like such:
char first;
fin.get(first);
cout << first << endl;
return first;

and it works fine. So I must be doing something wrong with the pointer.


Yes, two different things actually. And of course you should be using a
pointer at all. Try this

char first[3];
fin.getline(first, 3, '/');

Important lesson is to understand the difference between

char *first;

and

char first[3];

The first declares a pointer to char, it does not create any characters at
all. Just declaring a pointer does not make it point at anything. So in your
code you do not have any characters to read the first field into. Even if
you had got it to compile it would have crashed when you tried to do the
read.

The second declares an array of three characters, these are the three
characters you are going to read your field into. No need for compilcated
pointers, just use an array.

Your second mistake was to use get instead of getline.

john
Jul 22 '05 #2
John Harrison wrote:
"Francis Bell" <ph**********@charter.net> wrote in message
news:10*************@corp.supernews.com...
Hello,

I've got a program that is reading in a data file of 25 lines. Here is
an example of the first two lines:

sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0

In my program, I need to read in each line, BUT, I need to build a
different object based upon the characters in the first field. So, I
need to GET the first characters. And here's where I'm doing something
incorrectly. This is what I've got so far:

char readInFirstChars(ifstream &fin) {
char *first;
fin.get(first, 3, '/');
cout << first; // debugging line to see what is output
}
return first;
}

The above code give me a compile error stating:
" invalid conversion from `char*' to `char'"

I tried the get function with the single character parameter like such:
char first;
fin.get(first);
cout << first << endl;
return first;

and it works fine. So I must be doing something wrong with the pointer.

Yes, two different things actually. And of course you should be using a
pointer at all. Try this

char first[3];
fin.getline(first, 3, '/');

Important lesson is to understand the difference between

char *first;

and

char first[3];

The first declares a pointer to char, it does not create any characters at
all. Just declaring a pointer does not make it point at anything. So in your
code you do not have any characters to read the first field into. Even if
you had got it to compile it would have crashed when you tried to do the
read.

The second declares an array of three characters, these are the three
characters you are going to read your field into. No need for compilcated
pointers, just use an array.

Your second mistake was to use get instead of getline.

john

Hi John,
First, thanks for the quick reply! Unfortunately, I have been
instructed to use the get() function vice the getline() function. From
what I understand about the get() function with the three parameters, it
reads characters into a buffer until num - 1 characters have been read,
or in my case, until the '/' delim character is encountered. This way,
if it reads a line where the first field is only one character, it reads
that character and then encounters the '/' delimeter and stops. But
it's the first parameter that I'm not doing correctly. ... However,
what you said about me having just declared a pointer and not pointing
to anything made me think of something. And I just tried something else
and it worked for both of my problems! This is what I did:

while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
delete [] first;

This displays 'sp' to the screen for that first line of text in the data
file and 'f' for the second line, and the first field for all of the
other lines until EOF.

So now I'm on to the next problem in my program. But I'll work on that
for a few hours before posting back if I need to. Thanks again John for
looking at this. Although I couldn't use the getline as you suggested,
your suggestion pointed me to my problem. Thanks!

Frank

Jul 22 '05 #3

"Francis Bell" <ph**********@charter.net> wrote in message
news:10*************@corp.supernews.com...
John Harrison wrote:
"Francis Bell" <ph**********@charter.net> wrote in message
news:10*************@corp.supernews.com...
Hello,

I've got a program that is reading in a data file of 25 lines. Here is
an example of the first two lines:

sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0

In my program, I need to read in each line, BUT, I need to build a
different object based upon the characters in the first field. So, I
need to GET the first characters. And here's where I'm doing something
incorrectly. This is what I've got so far:

char readInFirstChars(ifstream &fin) {
char *first;
fin.get(first, 3, '/');
cout << first; // debugging line to see what is output
}
return first;
}

The above code give me a compile error stating:
" invalid conversion from `char*' to `char'"

I tried the get function with the single character parameter like such:
char first;
fin.get(first);
cout << first << endl;
return first;

and it works fine. So I must be doing something wrong with the pointer.

Yes, two different things actually. And of course you should be using a
pointer at all. Try this

char first[3];
fin.getline(first, 3, '/');

Important lesson is to understand the difference between

char *first;

and

char first[3];

The first declares a pointer to char, it does not create any characters at all. Just declaring a pointer does not make it point at anything. So in your code you do not have any characters to read the first field into. Even if you had got it to compile it would have crashed when you tried to do the
read.

The second declares an array of three characters, these are the three
characters you are going to read your field into. No need for compilcated pointers, just use an array.

Your second mistake was to use get instead of getline.

john

Hi John,
First, thanks for the quick reply! Unfortunately, I have been
instructed to use the get() function vice the getline() function.


Any particular reason?
From
what I understand about the get() function with the three parameters, it
reads characters into a buffer until num - 1 characters have been read,
or in my case, until the '/' delim character is encountered.
Yes, I'd forgotten about that, which is why I recommended getline,.but get
works too. The difference between get and getline, is that getline reads the
delimiter whereas get doesn't.
This way,
if it reads a line where the first field is only one character, it reads
that character and then encounters the '/' delimeter and stops. But
it's the first parameter that I'm not doing correctly. ... However,
what you said about me having just declared a pointer and not pointing
to anything made me think of something. And I just tried something else
and it worked for both of my problems! This is what I did:

I guess you missed out

char* first = new char[4];

or something similar.
while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
delete [] first;


Its still preferable to use an array instead of a pointer. Its more
efficient, safer and simpler, what's not to like?

Also you loop is wrong. The file might still be good even when you are at
the end of the file so you end up going round the loop one too many times.
Your loop should look like this

while (fin.get(first, 4, '/'))
{
cout << first << endl;
fin.ignore(80, '\n');
}

john
Jul 22 '05 #4
On Sat, 22 May 2004 22:54:45 +0100, "John Harrison"
<jo*************@hotmail.com> wrote:

"Francis Bell" <ph**********@charter.net> wrote in message
news:10*************@corp.supernews.com...
John Harrison wrote:
> "Francis Bell" <ph**********@charter.net> wrote in message
> news:10*************@corp.supernews.com...
>
>>Hello,
>>
>>I've got a program that is reading in a data file of 25 lines. Here is
>>an example of the first two lines:
>>
>>sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
>>f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0
>>
>>In my program, I need to read in each line, BUT, I need to build a
>>different object based upon the characters in the first field. So, I
>>need to GET the first characters. And here's where I'm doing something
>>incorrectly. This is what I've got so far:
>>
>>char readInFirstChars(ifstream &fin) {
>>char *first;
>> fin.get(first, 3, '/');
>> cout << first; // debugging line to see what is output
>>}
>>return first;
>>}
>>
>>The above code give me a compile error stating:
>>" invalid conversion from `char*' to `char'"
>>
>>I tried the get function with the single character parameter like such:
>> char first;
>> fin.get(first);
>> cout << first << endl;
>> return first;
>>
>>and it works fine. So I must be doing something wrong with the pointer.
>
>
> Yes, two different things actually. And of course you should be using a
> pointer at all. Try this
>
> char first[3];
> fin.getline(first, 3, '/');
>
> Important lesson is to understand the difference between
>
> char *first;
>
> and
>
> char first[3];
>
> The first declares a pointer to char, it does not create any charactersat > all. Just declaring a pointer does not make it point at anything. So inyour > code you do not have any characters to read the first field into. Evenif > you had got it to compile it would have crashed when you tried to do the
> read.
>
> The second declares an array of three characters, these are the three
> characters you are going to read your field into. No need forcompilcated > pointers, just use an array.
>
> Your second mistake was to use get instead of getline.
>
> john
>
>

Hi John,
First, thanks for the quick reply! Unfortunately, I have been
instructed to use the get() function vice the getline() function.


Any particular reason?
From
what I understand about the get() function with the three parameters, it
reads characters into a buffer until num - 1 characters have been read,
or in my case, until the '/' delim character is encountered.


Yes, I'd forgotten about that, which is why I recommended getline,.but get
works too. The difference between get and getline, is that getline reads the
delimiter whereas get doesn't.
This way,
if it reads a line where the first field is only one character, it reads
that character and then encounters the '/' delimeter and stops. But
it's the first parameter that I'm not doing correctly. ... However,
what you said about me having just declared a pointer and not pointing
to anything made me think of something. And I just tried something else
and it worked for both of my problems! This is what I did:


I guess you missed out

char* first = new char[4];

or something similar.
while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
delete [] first;


Its still preferable to use an array instead of a pointer. Its more
efficient, safer and simpler, what's not to like?

Also you loop is wrong. The file might still be good even when you are at
the end of the file so you end up going round the loop one too many times.
Your loop should look like this

while (fin.get(first, 4, '/'))
{
cout << first << endl;
fin.ignore(80, '\n');
}

john


Yeah, sorry, I forgot to copy and paste the pointer declaration. What
you put is accurate. This project is for a class, and my lab
instructor said we needed to use get() because we need the practice
with it. Although an array may be safer and simpler, this form of
get() that I needed to use doesn't allow for an array in the
parameters, otherwise I would have used it (primarily because I'm just
now getting used to pointers and I know that I know just enough about
them to be dangerous: :) ) I'll use the loop enhancement. Thanks
again John!!

Frank
Jul 22 '05 #5
Francis Bell <ph**********@charter.net> wrote in message
sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0
char first[3];
fin.getline(first, 3, '/');
while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
delete [] first;


How did you declare first? If as char first[4] then the call to
delete is unnecessary, and will, in some systems, cause a program
crash.
Jul 22 '05 #6
Siemel Naran wrote:
Francis Bell <ph**********@charter.net> wrote in message

sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0
char first[3];
fin.getline(first, 3, '/');


while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
delete [] first;

How did you declare first? If as char first[4] then the call to
delete is unnecessary, and will, in some systems, cause a program
crash.

Hi all,

I declared first like this:

void readInFirstChars(ifstream &fin)
{
char* first;
first = new char[2];
while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
cout << "Here first" << endl;
if (first == "sp") {
cout << "Here second" << endl;
Spinnerbait temp;
readInASpinnerbait(fin);
temp.outputSpinnerbait(cout);
}
delete [] first;

I included my whole function because I spoke too soon earlier when I
said everything worked. My function is not getting inside the 'if'
clause. I know this because "Here first" is printing out to the screen,
but "Here second" is not. I'm pretty sure it's because of my condition
(first == "sp"). I know first is a pointer to my character array that
gets my first field from the data file, so comparing it with "sp" is
probably, no IS incorrect. But I tried dereferencing first and
comparing, and I got a compile error stating, "ISO C++ forbids
comparison between pointer and integer". So, that said, how do I go
about comparing these?

Jul 22 '05 #7
>
Yeah, sorry, I forgot to copy and paste the pointer declaration. What
you put is accurate. This project is for a class, and my lab
instructor said we needed to use get() because we need the practice
with it. Although an array may be safer and simpler, this form of
get() that I needed to use doesn't allow for an array in the
parameters,


That is not true, an array and a pointer are equivalent in this situation
(as they are in most situations).

john
Jul 22 '05 #8
> Hi all,

I declared first like this:

void readInFirstChars(ifstream &fin)
{
char* first;
first = new char[2];
first = new char[4];

but as I said earlier you should be using an array

char first[4];

In either case though you need four characters, if you are going to say
fin.get(first, 4, '/');
while (fin.good())
{
fin.get(first, 4, '/');
cout << first << endl;
fin.ignore(80, '\n');
}
cout << "Here first" << endl;
if (first == "sp") {
This is wrong, you do not compare strings with ==

if (strcmp(first, "sp") == 0)
cout << "Here second" << endl;
Spinnerbait temp;
readInASpinnerbait(fin);
temp.outputSpinnerbait(cout);
}
delete [] first;
Get rid of this if you switch to an array.

I included my whole function because I spoke too soon earlier when I
said everything worked. My function is not getting inside the 'if'
clause. I know this because "Here first" is printing out to the screen,
but "Here second" is not. I'm pretty sure it's because of my condition
(first == "sp"). I know first is a pointer to my character array that
gets my first field from the data file, so comparing it with "sp" is
probably, no IS incorrect.
No, first == "sp" is a pointer comparison, it compares where first is
pointing to with where "sp" is. You need strcmp to copare the strings
themeselves.
But I tried dereferencing first and
comparing, and I got a compile error stating, "ISO C++ forbids
comparison between pointer and integer". So, that said, how do I go
about comparing these?


Seems like you are learning an old fashioned style of C++ programming.
Modern C++ has a string class which is easier to use than a char array (or
char pointer).

john
Jul 22 '05 #9
Francis Bell <ph**********@charter.net> wrote in message
sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0 void readInFirstChars(ifstream &fin)
{
char* first;
first = new char[2];
It's fine to just say
char first[2];
and remove the delete statement below.
while (fin.good())
{
fin.get(first, 4, '/');
Why is first of 2 chars but you read 4 chars into it?
cout << first << endl;
fin.ignore(80, '\n');
}
cout << "Here first" << endl;
if (first == "sp") {
You're comparing the value of the pointers (ie. comparing the memory
address locations). Use std::strcmp from <cstring> (same as strcmp
from string.h).
cout << "Here second" << endl;
Spinnerbait temp;
readInASpinnerbait(fin);
temp.outputSpinnerbait(cout);
}
delete [] first;

Jul 22 '05 #10
On 22 May 2004 23:56:12 -0700, na*******@excite.com (Siemel Naran)
wrote:
Francis Bell <ph**********@charter.net> wrote in message
sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0

void readInFirstChars(ifstream &fin)
{
char* first;
first = new char[2];


It's fine to just say
char first[2];
and remove the delete statement below.
while (fin.good())
{
fin.get(first, 4, '/');


Why is first of 2 chars but you read 4 chars into it?
cout << first << endl;
fin.ignore(80, '\n');
}
cout << "Here first" << endl;
if (first == "sp") {


You're comparing the value of the pointers (ie. comparing the memory
address locations). Use std::strcmp from <cstring> (same as strcmp
from string.h).
cout << "Here second" << endl;
Spinnerbait temp;
readInASpinnerbait(fin);
temp.outputSpinnerbait(cout);
}
delete [] first;

Thanks John and Siemel. I'll go back in and try changing it to an
array. However, the documentation for the parameters for that form of
get() function show that the first parameter needs to be a char*, but
I'll try the array. Also, the documentation says that for the second
parameter (num), it reads up to num-1 characters of the input stream,
or until the delimeter (third parameter) is reached or EOF is reached.
So, I have at most a two character first field with a third character
being the '/' delimeter for a total of 3 characters for the function
to read. So I simply figured it needed num - 1 and I needed 3 so
that's where I came up with 4. And I've used the strcmp before, but
completely forgot about it. Thanks! I'll get back with you and let
you know how things work out.

Frank
Jul 22 '05 #11
> Thanks John and Siemel. I'll go back in and try changing it to an
array. However, the documentation for the parameters for that form of
get() function show that the first parameter needs to be a char*, but
I'll try the array.
Yes, array are autoamtically converted to pointers, so any function which
say it needs a pointer can be given an array.

Also, the documentation says that for the second parameter (num), it reads up to num-1 characters of the input stream,
or until the delimeter (third parameter) is reached or EOF is reached.
So, I have at most a two character first field with a third character
being the '/' delimeter for a total of 3 characters for the function
to read. So I simply figured it needed num - 1 and I needed 3 so
that's where I came up with 4.


4 is fine, but the size of the array and the size you pass to get must be
the same. You are telling get that you have four characters in the array,
but actually you've only got two.

john
Jul 22 '05 #12
Phrank wrote:
On 22 May 2004 23:56:12 -0700, na*******@excite.com (Siemel Naran)
wrote:

Francis Bell <ph**********@charter.net> wrote in message

sp/spinnerbait/AAA Lures/Mad Phil/silver/bass/1/1
f/floating minnow/AAA Lures/Skinny Minney/green/bass/0/0/0

void readInFirstChars(ifstream &fin)
{
char* first;
first = new char[2];


It's fine to just say
char first[2];
and remove the delete statement below.

while (fin.good())
{
fin.get(first, 4, '/');


Why is first of 2 chars but you read 4 chars into it?

cout << first << endl;
fin.ignore(80, '\n');
}
cout << "Here first" << endl;
if (first == "sp") {


You're comparing the value of the pointers (ie. comparing the memory
address locations). Use std::strcmp from <cstring> (same as strcmp

from string.h).

cout << "Here second" << endl;
Spinnerbait temp;
readInASpinnerbait(fin);
temp.outputSpinnerbait(cout);
}
delete [] first;


Thanks John and Siemel. I'll go back in and try changing it to an
array. However, the documentation for the parameters for that form of
get() function show that the first parameter needs to be a char*, but
I'll try the array. Also, the documentation says that for the second
parameter (num), it reads up to num-1 characters of the input stream,
or until the delimeter (third parameter) is reached or EOF is reached.
So, I have at most a two character first field with a third character
being the '/' delimeter for a total of 3 characters for the function
to read. So I simply figured it needed num - 1 and I needed 3 so
that's where I came up with 4. And I've used the strcmp before, but
completely forgot about it. Thanks! I'll get back with you and let
you know how things work out.

Frank

Hi all,

I changed things around and am now using the array version. Everything
for this part of the problem is working fine now. I still have other
issues with the program, but it's one step at a time, and I want to look
at it further myself and try to figure it out before posting here.
Thanks again!

Frank

Jul 22 '05 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Alex Vinokur | last post by:
I have several questins concerning a program below. ------ foo.cpp : BEGIN ------ #include <cassert> #include <cstdlib> #include <iostream> #include <fstream> using namespace std; int...
3
by: kieran | last post by:
Hi, I'm using fstream.get to read in a character from a file, then print it on the screen. I have a file called test.log that contains "Hello, World!", but when I try and print the contents out on...
3
by: HuYi | last post by:
Hi,everyone,I want to get a string as '\u65e0\u6cd5' in TextBox,but when I trace the program,I found that TextBox.Text=@"\u65e0\u6cd5", But I want "\u65e0\u6cd5",not @"\u65e0\u6cd5". I used...
5
by: Neo | last post by:
how convert CString to char *? regards, Mohammad Omer Nasir
8
by: machikelxol | last post by:
I'm having a strange error when I try reading from a file. here is the code: buffstring values = 1, 2, 3, 4 and then it crashes afterwards on the 4th iteration. This works fine until the fourth...
8
by: mailursubbu | last post by:
Hi, Will it be possible to #define a char pointer... It means if write some thing like #define CHAR_PTR (char *) // I know this wont work I should be able to use CHAR_PTR to define a...
2
by: adamjroth | last post by:
Hello, I'm having trouble with IE's Range/Selection objects: when a user click's anywhere in an element, can I create a range at that point exactly _AND_ get the character offset? The code...
1
by: veblen.lee | last post by:
for an example: 'a' value 0x61 '1' value 0x31.
4
by: shaif | last post by:
Hi i have problem with separating Character from string, e.g: dim S as string dim k as string S="23 * 12 UBV 100"; how to i get output k="UBV"
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.