i'm going to get my permit to drive, so any pointers?
Is the class c written test at the dmv hard?
I don't think so. I did pretty well actually. The only problem I had was with the signs. If you know what signs mean what, then you should do fine. Ummm... also, that sign that means "curvy road ahead" wasn't one of the answers. It's pretty basic. You should also know when to pull over and yield and when to pull over and stop (as per ambulance and police) AAAh, you should do fine!! : )
Reply:LOL, it depends on what state you are in. Back when I got my Wisconsin license, it was a piece of cake, of course I *did* just finish a classroom version at school. But, in California, I failed it!!! They guy felt bad for me and gave me my license anyway. I just didn't know all the obscure CA driving laws. So, my advice is to get the booklet and study up.
Sunday, August 2, 2009
Need to learn C++ pronto - Book reccomendations?
Preferably with a book that explains pointers in an easy to follow manner - anyone seen a book that does this?
thanks!
Need to learn C++ pronto - Book reccomendations?
It depends on your background. C++ has 2 main things that can cause problems for people. One is pointers, and the other is OOP.
For pointers I would recommend starting with Kernighan and Ritchie, if you have some programming experience. It is a little terse for a new programmer, but for experienced people that is desirable. It is about C, not C++, but the exposition of pointers is clearest.
If you do know C then Stroustrup's book is pretty good: http://amazon.com/s/ref=nb_ss_gw/103-488... You can pick and choose the chapters that you think you need most.
Reply:dunno
Rome was not built in day my friend but here is your link
http://www.google.co.uk/search?hl=en%26amp;q=l...
thanks!
Need to learn C++ pronto - Book reccomendations?
It depends on your background. C++ has 2 main things that can cause problems for people. One is pointers, and the other is OOP.
For pointers I would recommend starting with Kernighan and Ritchie, if you have some programming experience. It is a little terse for a new programmer, but for experienced people that is desirable. It is about C, not C++, but the exposition of pointers is clearest.
If you do know C then Stroustrup's book is pretty good: http://amazon.com/s/ref=nb_ss_gw/103-488... You can pick and choose the chapters that you think you need most.
Reply:dunno
Rome was not built in day my friend but here is your link
http://www.google.co.uk/search?hl=en%26amp;q=l...
New statement in C++?
I have a test tomorrow where I have to insert a new statement into a class given to get the program to work. Basically if I get it to work I do well and get an A if I don't then I don't pass the class. I'm really stressed out and I understand pointers and somewhat classes. Can anyone demonstrate how you would use a new statement in classes?
New statement in C++?
I assume by inserting a "new statement" you mean using the operator 'new', not simply adding a statement that wasn't there before. You also say you need to add this statement to get the program to work. Not knowing why it's not working it's hard to say what needs to be done to make it work. However, I can give you an example of how and why you would use 'new' in a class.
In the simple example below, the class Array has a private attribute that is a pointer to some type, intended to be used to point to an array of objects of that type. In order to get the memory allocated that I need for the array, I use 'new' in the constructor.
So, I'm guessing that in your test, you'll encounter a similar situation. The class will have an attribute that is a pointer to something, and you'll use 'new' in the constructor to allocate the memory you need. Good luck!
#include %26lt;iostream%26gt;
using namespace std;
template %26lt;class T%26gt;
class Array {
public:
Array%26lt;T%26gt;() : _len(0), _a(NULL) { }
Array%26lt;T%26gt;(unsigned len) : _len(len) {
_a = new T [len];
}
unsigned len() { return _len; }
T%26amp; operator[](unsigned x) {
assert ((_a != NULL) %26amp;%26amp; (x %26lt; _len) %26amp;%26amp; (_len %26gt; 0));
return _a[x];
}
~Array%26lt;T%26gt;() { delete [] _a; }
private:
unsigned _len;
T *_a;
};
int main(int argc, char *argv[]) {
Array%26lt;int%26gt; A(5);
// Initialize
for (unsigned i = 0; i %26lt; A.len(); i++) {
A[i] = i;
}
// Print
for (unsigned i = 0; i %26lt; A.len(); i++) {
cout %26lt;%26lt; A[i] %26lt;%26lt; " ";
}
cout %26lt;%26lt; endl;
// Test out of range check
A[99] = 99;
return 0;
}
New statement in C++?
I assume by inserting a "new statement" you mean using the operator 'new', not simply adding a statement that wasn't there before. You also say you need to add this statement to get the program to work. Not knowing why it's not working it's hard to say what needs to be done to make it work. However, I can give you an example of how and why you would use 'new' in a class.
In the simple example below, the class Array has a private attribute that is a pointer to some type, intended to be used to point to an array of objects of that type. In order to get the memory allocated that I need for the array, I use 'new' in the constructor.
So, I'm guessing that in your test, you'll encounter a similar situation. The class will have an attribute that is a pointer to something, and you'll use 'new' in the constructor to allocate the memory you need. Good luck!
#include %26lt;iostream%26gt;
using namespace std;
template %26lt;class T%26gt;
class Array {
public:
Array%26lt;T%26gt;() : _len(0), _a(NULL) { }
Array%26lt;T%26gt;(unsigned len) : _len(len) {
_a = new T [len];
}
unsigned len() { return _len; }
T%26amp; operator[](unsigned x) {
assert ((_a != NULL) %26amp;%26amp; (x %26lt; _len) %26amp;%26amp; (_len %26gt; 0));
return _a[x];
}
~Array%26lt;T%26gt;() { delete [] _a; }
private:
unsigned _len;
T *_a;
};
int main(int argc, char *argv[]) {
Array%26lt;int%26gt; A(5);
// Initialize
for (unsigned i = 0; i %26lt; A.len(); i++) {
A[i] = i;
}
for (unsigned i = 0; i %26lt; A.len(); i++) {
cout %26lt;%26lt; A[i] %26lt;%26lt; " ";
}
cout %26lt;%26lt; endl;
// Test out of range check
A[99] = 99;
return 0;
}
How can we store strings in an array in c?
that is, getting 3 names like john,david and deny using "for" loop then storing these names into an array using the same "for" loop.
simply getting and storing names will be done in the same "for" loop in any method like without using pointers.i've a doubt is there any method to getting and storing names in "for" loop without using pointers?if so please explain me........
How can we store strings in an array in c?
You may want to buy K%26amp;R's "The C Programming Language" which is the standard book for C programmers. They cover C strings. I'll point you to an online tutorial (http://www.cprogramming.com/tutorial/c/l... ).
There's two ways you can have a string. You can either have a pointer to a string literal, or have an array (either a pointer to one or the array object itself).
You may want to lookup the C standard library to see what you can use for input. (http://cppreference.com/stdio/index.html... The fgets function is particularly useful for this. If you look at the tutorial I pointed you to, they mention how to use it.
Reply:You can do it with a fixed-size array of char* s:
char* MyArray[ 3 ];
But no, there have to be pointers involved.
lady palm
simply getting and storing names will be done in the same "for" loop in any method like without using pointers.i've a doubt is there any method to getting and storing names in "for" loop without using pointers?if so please explain me........
How can we store strings in an array in c?
You may want to buy K%26amp;R's "The C Programming Language" which is the standard book for C programmers. They cover C strings. I'll point you to an online tutorial (http://www.cprogramming.com/tutorial/c/l... ).
There's two ways you can have a string. You can either have a pointer to a string literal, or have an array (either a pointer to one or the array object itself).
You may want to lookup the C standard library to see what you can use for input. (http://cppreference.com/stdio/index.html... The fgets function is particularly useful for this. If you look at the tutorial I pointed you to, they mention how to use it.
Reply:You can do it with a fixed-size array of char* s:
char* MyArray[ 3 ];
But no, there have to be pointers involved.
lady palm
Rate my fantasy baseball team? on a scale of 1-10, and any tips or pointers on how to imrprove would be great!
This is a 10 man rotisserie league, and my players are the following: C Victor Martinez, 1B Justin Morneau, 2B Tadahito Iguchi, 3B is a draw between Akinori Iwamura and BJ Upton (both on tampa bay fighting for a spot), SS Jose Reyes, OF Matt Holliday, Jeff Francoeur, Michael Cuddyer, Util is Travis Hafner, My Bench is Raul Ibanez and Mike Piazza, Lyle Overbay and atm BJ Upton. My Pitchers are BJ Ryan, Ben Sheets, Chad Cordero, Curt Schilling, Rich Harden, Erik Bedard and Kelvim Escobar
Rate my fantasy baseball team? on a scale of 1-10, and any tips or pointers on how to imrprove would be great!
It's an 8.5. You should shop some pitching talent so that you won't have to start a third baseman that narrowly avoids a platoon job. But isn't Ibanez third base-eligible? If he is, I'd start him there. Then you should put Hafner in the outfield for Cuddyer and get a good utility guy. Your pitching looks good, but you might want to think about trading a reliver for another starter.
Reply:I would rate it a 7.5. I also have Morneau at 1st, and Piazza! Well, you could have done a better job at picking pitchers. Raul Ibanez should play. And i'd say your team is pretty solid, but i'd be careful too.
Rate my fantasy baseball team? on a scale of 1-10, and any tips or pointers on how to imrprove would be great!
It's an 8.5. You should shop some pitching talent so that you won't have to start a third baseman that narrowly avoids a platoon job. But isn't Ibanez third base-eligible? If he is, I'd start him there. Then you should put Hafner in the outfield for Cuddyer and get a good utility guy. Your pitching looks good, but you might want to think about trading a reliver for another starter.
Reply:I would rate it a 7.5. I also have Morneau at 1st, and Piazza! Well, you could have done a better job at picking pitchers. Raul Ibanez should play. And i'd say your team is pretty solid, but i'd be careful too.
New to c++, pls help with arrays, call by value, and by reference?
HI,
I am still new in this language. i would like some help. i need to write a program that finds an avarage marks of "y" students by rerunning and terminating the program. i need this in a 2 dimensional array to store a roll number and marks of the "y" number of the students. it should include array of pointers, call by value and call by reference.
my main problem is to combine all these in one program.
give me the codes and an explanation on calling by value and reference.
your help will mean alot to me. thank you.
New to c++, pls help with arrays, call by value, and by reference?
I've been trying to pass on a multi-dimensional array as parameter to a function but I think it'd never work. But I do know how to pass an array to a function.. All you have to do is use pointers... Pointers are very useful when handling arays especially when passing them on to functions as parameters. For example:
void doThis(int *myArray)
{
// some statements
}
This is passing an array as parameter by reference... Since when we say pointer, you are actually pointing to the specific address of the whatever variable being passed on. So, with the use of pointer, whatever changes you make with the variable, they are readily passed to the actual source or address.. This is Calling By Reference.
While Call by Value through arrays is usually done like this...
void doThis(int myArray[])
{
// some statements
}
Remember, when using ByValue parameters, you cannot change the value of the passing variable. You can only temporarily change the value of the variable being passed but only within the premises of the function.
I am still new in this language. i would like some help. i need to write a program that finds an avarage marks of "y" students by rerunning and terminating the program. i need this in a 2 dimensional array to store a roll number and marks of the "y" number of the students. it should include array of pointers, call by value and call by reference.
my main problem is to combine all these in one program.
give me the codes and an explanation on calling by value and reference.
your help will mean alot to me. thank you.
New to c++, pls help with arrays, call by value, and by reference?
I've been trying to pass on a multi-dimensional array as parameter to a function but I think it'd never work. But I do know how to pass an array to a function.. All you have to do is use pointers... Pointers are very useful when handling arays especially when passing them on to functions as parameters. For example:
void doThis(int *myArray)
{
// some statements
}
This is passing an array as parameter by reference... Since when we say pointer, you are actually pointing to the specific address of the whatever variable being passed on. So, with the use of pointer, whatever changes you make with the variable, they are readily passed to the actual source or address.. This is Calling By Reference.
While Call by Value through arrays is usually done like this...
void doThis(int myArray[])
{
// some statements
}
Remember, when using ByValue parameters, you cannot change the value of the passing variable. You can only temporarily change the value of the variable being passed but only within the premises of the function.
Anybody knows C language????????
i want notes on pointers,arrays,dynamic memory allocation %26amp; structures.
Thank you
Anybody knows C language????????
http://www.mycplus.com/ ("C++")
http://publications.gbdirect.co.uk/c_boo... ("C")
http://en.wikibooks.org/wiki/C_Programmi... ("C")
http://www.physics.drexel.edu/courses/Co... ("C")
http://cslibrary.stanford.edu/101/ ("C")
http://www.cplusplus.com/doc/tutorial/ ("C++")
http://www.hotscripts.com/C_and_C++/Tips...
http://en.wikipedia.org/wiki/C_programmi...
FREE C COMPILERS:
http://gcc.gnu.org/ (Best?)
http://msdn.microsoft.com/visualc/vctool...
http://www.thefreecountry.com/compilers/...
http://www.borland.com/products/download...
Reply:You are very welcome, and thank you! :) Report It
Reply:i know the p and s language not c language!!!!
Thank you
Anybody knows C language????????
http://www.mycplus.com/ ("C++")
http://publications.gbdirect.co.uk/c_boo... ("C")
http://en.wikibooks.org/wiki/C_Programmi... ("C")
http://www.physics.drexel.edu/courses/Co... ("C")
http://cslibrary.stanford.edu/101/ ("C")
http://www.cplusplus.com/doc/tutorial/ ("C++")
http://www.hotscripts.com/C_and_C++/Tips...
http://en.wikipedia.org/wiki/C_programmi...
FREE C COMPILERS:
http://gcc.gnu.org/ (Best?)
http://msdn.microsoft.com/visualc/vctool...
http://www.thefreecountry.com/compilers/...
http://www.borland.com/products/download...
Reply:You are very welcome, and thank you! :) Report It
Reply:i know the p and s language not c language!!!!
Car A/C -- hot/cold air knob stuck. Won't move to "cold".?
2002 Mitsubishi lancer. I obviously left it on "hot" for the entire winter, and now I realize it's stuck there -- it will at most move halfway but won't go all the way to "cold"? Any pointers for self-service?
Car A/C -- hot/cold air knob stuck. Won't move to "cold".?
The blend door is stuck or the cable went bad, but what your symtom sounds like is the door is stuck! Most Mits heater controls are not inside the HVAC box they put them on the outside so you need to remove the access cover (7MM nut driver) that is across the drivers side under dash area and lay on your back on the floor on the drivers side. Reach up and turn the knob and you will see a gear assembly made from white plastic that has a cable attatched to it wiggling when you wiggle the knob! Try to move the assebly by hand If you can then you need to lubricate the gear assy and possibly replace the cable. If it wont move even at the gear assy then something fell down one of the vents and is blocking the motion of the door!!
Reply:Continue to move the knob to free up cable. Next try to find the cable under the dash then use some vise grips to move cable while spraying WD40 to lube cable.
Reply:Knob or slider? Probably a slider. Your cable is stuck or bent. I suppose it's possible that it could be the door, but much more likely just the cable. You're not gonna like this job, unless you get lucky and can just replace or repair the cable without removing the dashboard. (and yes, you might be able to; you'll have to look to see if you can reach the where the cable attaches to the heat "box". Even if you have to take the dash apart, it's really not that hard. BUT get a book (a repair manual) and follow along STEP BY STEP.
snow of june
Car A/C -- hot/cold air knob stuck. Won't move to "cold".?
The blend door is stuck or the cable went bad, but what your symtom sounds like is the door is stuck! Most Mits heater controls are not inside the HVAC box they put them on the outside so you need to remove the access cover (7MM nut driver) that is across the drivers side under dash area and lay on your back on the floor on the drivers side. Reach up and turn the knob and you will see a gear assembly made from white plastic that has a cable attatched to it wiggling when you wiggle the knob! Try to move the assebly by hand If you can then you need to lubricate the gear assy and possibly replace the cable. If it wont move even at the gear assy then something fell down one of the vents and is blocking the motion of the door!!
Reply:Continue to move the knob to free up cable. Next try to find the cable under the dash then use some vise grips to move cable while spraying WD40 to lube cable.
Reply:Knob or slider? Probably a slider. Your cable is stuck or bent. I suppose it's possible that it could be the door, but much more likely just the cable. You're not gonna like this job, unless you get lucky and can just replace or repair the cable without removing the dashboard. (and yes, you might be able to; you'll have to look to see if you can reach the where the cable attaches to the heat "box". Even if you have to take the dash apart, it's really not that hard. BUT get a book (a repair manual) and follow along STEP BY STEP.
snow of june
I want C programs for BCA course?
like functions, strings, structre , pointers, recursions, and many more file handling.
I want C programs for BCA course?
Surely the idea of the course is that you learn that stuff for yourself - otherwise how will you ever get an understanding of it?
The things you mention would all combined only need a couple of screens worth of code, so it's not that much to ask of you!
Reply:C programs for BCA course??????????
hey don't ask any one go give programs
Ur becoming Programmer so u have to develop Ur programming skills better to understand concept first and try to implement it using mathematics. i mean to say finding GCD, given number is even or odd, sqrt, try to calculate sin, cos, tan values using there Formulas..
good practice is implement mathematics formulas in Ur programming then Ur programming skils become good then you will become good programmer..
All The Best..........
Reply:And why do you think that I'll do your work even to the extent of telling you where on the web to find them? It is the point of your course to learn. You can't learn without trying. So, go try.
I want C programs for BCA course?
Surely the idea of the course is that you learn that stuff for yourself - otherwise how will you ever get an understanding of it?
The things you mention would all combined only need a couple of screens worth of code, so it's not that much to ask of you!
Reply:C programs for BCA course??????????
hey don't ask any one go give programs
Ur becoming Programmer so u have to develop Ur programming skills better to understand concept first and try to implement it using mathematics. i mean to say finding GCD, given number is even or odd, sqrt, try to calculate sin, cos, tan values using there Formulas..
good practice is implement mathematics formulas in Ur programming then Ur programming skils become good then you will become good programmer..
All The Best..........
Reply:And why do you think that I'll do your work even to the extent of telling you where on the web to find them? It is the point of your course to learn. You can't learn without trying. So, go try.
Miniproject in c language?
it must cover structures, files,pointers
Miniproject in c language?
Go to Computers %26amp; Internet, Programming %26amp; Design. You are talking about a "computer programming language", not a natural language, like English?!
Reply:Seriously, I have absolutely NO idea what you are asking. Edit please?
Miniproject in c language?
Go to Computers %26amp; Internet, Programming %26amp; Design. You are talking about a "computer programming language", not a natural language, like English?!
Reply:Seriously, I have absolutely NO idea what you are asking. Edit please?
Help in c language.data structure ?
hi...we need to create a linked list of structures(nodes) using pointers ..the problem when i allocate a place for every new node it gives an error :
#include%26lt;stdio.h%26gt;
struct node{
char name[20];
struct node *next;
};
int main(void){
struct node *p;
//we want to create 3 nodes
for(int i=0;i%26lt;3;i++)
{
p = new node; //AND HERE IT GIVES THE ERROR ('new' undeclared identifier)
so whats the problem ?any help is appreciated
Help in c language.data structure ?
Change the struct as follows:
#define NAME_SIZE 20
struct node{
char name[NAME_SIZE];
struct node *next;
};
int main(void){
struct node *top = NULL;
struct node *newnode;
//we want to create 3 nodes
char buf[256];
for(int i=0;i%26lt;3;i++)
{
newnode = makeNode();
sprintf(buf, "Node # %d", i); /* make a node name */
setName(newnode, buf);
if ( top != NULL) newnode-%26gt;next = top;
top = newnode;
}
}
/* create a function make a node */
struct node * makeNode()
{
p = (node*)malloc(sizeof(node));
/* remember to initialize the node name */
p-%26gt;name[0] = '\0';
p-%26gt;next = NULL;
return p;
}
/* create a function to set the name
* this makes sure that you dont put in a string
* that is too long and overwrite memory.
*/
void setName(struct node * p, char * name)
{
strncpy(p-%26gt;name, name, NAME_SIZE);
/* null terminate the string */
p-%26gt;name[NAME_SIZE-1] = '\0';
}
Reply:"new" is a C++ operator, use malloc for C:
p = (node*)malloc(sizeof(node));
Reply:I think in c you need to do something like:
p = (node*)malloc(sizeof(node));
instead of p = new node;
you may want to check if your struct format is correct as well
#include%26lt;stdio.h%26gt;
struct node{
char name[20];
struct node *next;
};
int main(void){
struct node *p;
//we want to create 3 nodes
for(int i=0;i%26lt;3;i++)
{
p = new node; //AND HERE IT GIVES THE ERROR ('new' undeclared identifier)
so whats the problem ?any help is appreciated
Help in c language.data structure ?
Change the struct as follows:
#define NAME_SIZE 20
struct node{
char name[NAME_SIZE];
struct node *next;
};
int main(void){
struct node *top = NULL;
struct node *newnode;
//we want to create 3 nodes
char buf[256];
for(int i=0;i%26lt;3;i++)
{
newnode = makeNode();
sprintf(buf, "Node # %d", i); /* make a node name */
setName(newnode, buf);
if ( top != NULL) newnode-%26gt;next = top;
top = newnode;
}
}
/* create a function make a node */
struct node * makeNode()
{
p = (node*)malloc(sizeof(node));
/* remember to initialize the node name */
p-%26gt;name[0] = '\0';
p-%26gt;next = NULL;
return p;
}
/* create a function to set the name
* this makes sure that you dont put in a string
* that is too long and overwrite memory.
*/
void setName(struct node * p, char * name)
{
strncpy(p-%26gt;name, name, NAME_SIZE);
/* null terminate the string */
p-%26gt;name[NAME_SIZE-1] = '\0';
}
Reply:"new" is a C++ operator, use malloc for C:
p = (node*)malloc(sizeof(node));
Reply:I think in c you need to do something like:
p = (node*)malloc(sizeof(node));
instead of p = new node;
you may want to check if your struct format is correct as well
In C++, What is the use of using std::ios? What will it do in the program?
I also want to know the use of
using std::setiosflags
and
using std::fixed
Can u give examples for all
Explain pointers in simple and complete way...
Can u explain how to use strings...especially when the
program is in class format?
Thanks
In C++, What is the use of using std::ios? What will it do in the program?
Please do your school questions alone otherwise you will not learn. I am sure that your C++ book explains all these if only you did care to read it.
Reply:.... "and then, could you write a research paper for me on the rise of computing in the 20th century. Also, explain, in mind-boggling detail, the entire concept of object oriented programming. Can u give an exhaustive explanation of all the different data types, as well as complete programs that use them....."
Ok - I'm on it!
Reply:Even worse Old Programmers like me will never hire you.
sweet pea
using std::setiosflags
and
using std::fixed
Can u give examples for all
Explain pointers in simple and complete way...
Can u explain how to use strings...especially when the
program is in class format?
Thanks
In C++, What is the use of using std::ios? What will it do in the program?
Please do your school questions alone otherwise you will not learn. I am sure that your C++ book explains all these if only you did care to read it.
Reply:.... "and then, could you write a research paper for me on the rise of computing in the 20th century. Also, explain, in mind-boggling detail, the entire concept of object oriented programming. Can u give an exhaustive explanation of all the different data types, as well as complete programs that use them....."
Ok - I'm on it!
Reply:Even worse Old Programmers like me will never hire you.
sweet pea
In c++, how would u delete a node from a linked list?
ok so im supposed to delete a user specified node from a list of 10 nodes. I can locate the node but how would i actually delete it? I like dymanic arrays but sometimes r a pain cause of pointers :(
In c++, how would u delete a node from a linked list?
In general you will
1. Point the previous node at the next node
2. If it's a doubly linked list point the next node at the previous node
3. Destroy the current node, being sure to delete and release all allocated memory.
This site provides more detail:
http://www.inversereality.org/tutorials/...
In c++, how would u delete a node from a linked list?
In general you will
1. Point the previous node at the next node
2. If it's a doubly linked list point the next node at the previous node
3. Destroy the current node, being sure to delete and release all allocated memory.
This site provides more detail:
http://www.inversereality.org/tutorials/...
I need help with qsort in C++?
// Documentation Begins
void qsort ( void * base, int num, int size, int ( * comparator ) ( const void *, const void * ) );
base
Pointer to the first element of the array to be sorted.
num
Number of elements in the array pointed at by base.
size
Size in bytes of each element in the array.
comparator
Function that compares two elements. The function shall follow this prototype:
int comparator ( const void * elem1, const void * elem2 );
The function must accept two parameters that are pointers to elements, type-casted as void*. These parameters should be cast back to some data type and be compared.
The return value of this function should represent whether elem1 is considered less than, equal, or greater than elem2 by returning, respectively, a negative value, zero or a positive value.
// End of qsort documentation
Lets say I have an array of Strings defined, how would I use qsort to alphabetically sorth them.
I need help with qsort in C++?
/************************************
Name: qsort.c
Sorry -- it's in C, but it's a short
walk to C++
For strings, change Ascend() and Descend() to handle strings...
int Ascend(const void *p1, const void *p2)
{
char *s1 = (char *)p1;
char *s2 = (char *)p2;
return strcmp(s1,s2);
}
*************************************/
#include %26lt;stdlib.h%26gt;
#include %26lt;stdio.h%26gt;
int num[]={1,3,5,4,2,9,0,8,6,7};
int Ascend(const void *p1, const void *p2)
{
int i=*(int *)p1;
int j=*(int *)p2;
return i-j;
}
int Descend(const void *p1, const void *p2)
{
int i= *(int *)p1;
int j= *(int *)p2;
return j-i;
}
int main()
{
int i;
printf("\nOrig array: ");
for (i=0; i%26lt;10; i++)
printf("%d ", num[i]);
qsort(num, 10, sizeof(int), Ascend);
printf("\nSorted array[Ascending]: ");
for (i=0; i%26lt;10; i++)
printf("%d ", num[i]);
qsort(num, 10, sizeof(int),Descend);
printf("\nSorted array[Descending]: ");
for (i=0; i%26lt;10; i++)
printf("%d ", num[i]);
}
bottle palm
void qsort ( void * base, int num, int size, int ( * comparator ) ( const void *, const void * ) );
base
Pointer to the first element of the array to be sorted.
num
Number of elements in the array pointed at by base.
size
Size in bytes of each element in the array.
comparator
Function that compares two elements. The function shall follow this prototype:
int comparator ( const void * elem1, const void * elem2 );
The function must accept two parameters that are pointers to elements, type-casted as void*. These parameters should be cast back to some data type and be compared.
The return value of this function should represent whether elem1 is considered less than, equal, or greater than elem2 by returning, respectively, a negative value, zero or a positive value.
// End of qsort documentation
Lets say I have an array of Strings defined, how would I use qsort to alphabetically sorth them.
I need help with qsort in C++?
/************************************
Name: qsort.c
Sorry -- it's in C, but it's a short
walk to C++
For strings, change Ascend() and Descend() to handle strings...
int Ascend(const void *p1, const void *p2)
{
char *s1 = (char *)p1;
char *s2 = (char *)p2;
return strcmp(s1,s2);
}
*************************************/
#include %26lt;stdlib.h%26gt;
#include %26lt;stdio.h%26gt;
int num[]={1,3,5,4,2,9,0,8,6,7};
int Ascend(const void *p1, const void *p2)
{
int i=*(int *)p1;
int j=*(int *)p2;
return i-j;
}
int Descend(const void *p1, const void *p2)
{
int i= *(int *)p1;
int j= *(int *)p2;
return j-i;
}
int main()
{
int i;
printf("\nOrig array: ");
for (i=0; i%26lt;10; i++)
printf("%d ", num[i]);
qsort(num, 10, sizeof(int), Ascend);
printf("\nSorted array[Ascending]: ");
for (i=0; i%26lt;10; i++)
printf("%d ", num[i]);
qsort(num, 10, sizeof(int),Descend);
printf("\nSorted array[Descending]: ");
for (i=0; i%26lt;10; i++)
printf("%d ", num[i]);
}
bottle palm
I'd like to fix up a 1990 Dodge Dakota. Any ideas, pointers, recommendations?
In KY, my vehicle registration taxes would be considerably cheaper (say, $15/year as opposed to the average $200 assessed on vehicles) b/c it's an older model.
I'll be honest, this is an old farm truck on the farm of one of my deceased relatives and hasn't been registered since 1993. It has only 10,500 miles on it. My dad and I take it out for a spin on the farm 2-4 times yearly. We've looked at the engine and see no major mechanical problems to speak of, and we would take it to our mechanic to see if he agrees with us or not.
There are some major dents to the back bed, but that's really about it. Replacing the bed, passenger door, and repainting the truck will cost around $1000.
This is a truck that has potential, and I would hate to see it waste away while I drive some newer car that is supposedly "better." (I know I'll have to go through legal ramifications to obtain this vehicle (I've been given the green light by its inherited owner,) but I'm not asking about that.)
I'd like to fix up a 1990 Dodge Dakota. Any ideas, pointers, recommendations?
The best advice i can give you on the Dakota is change out the carburetor..they are junk..they have the worst problems..id know i had two 1989 and 1990 Dakota's and i put efi on them and the truck worked great..good luck
one the other side it sounds like the truck is well worth fixing..is it 4x4?
Reply:It sounds very good deal.
Change all the fluids (and filters as appropriate): transmission, rear end, brakes, power steering, oil, coolant.
Make sure the brakes work properly.
You will probably need new tires - LT type tires last longer, are a bit more expensive and ride harder than P type tires.
Replace the fan/accessory drive belts.
I'll be honest, this is an old farm truck on the farm of one of my deceased relatives and hasn't been registered since 1993. It has only 10,500 miles on it. My dad and I take it out for a spin on the farm 2-4 times yearly. We've looked at the engine and see no major mechanical problems to speak of, and we would take it to our mechanic to see if he agrees with us or not.
There are some major dents to the back bed, but that's really about it. Replacing the bed, passenger door, and repainting the truck will cost around $1000.
This is a truck that has potential, and I would hate to see it waste away while I drive some newer car that is supposedly "better." (I know I'll have to go through legal ramifications to obtain this vehicle (I've been given the green light by its inherited owner,) but I'm not asking about that.)
I'd like to fix up a 1990 Dodge Dakota. Any ideas, pointers, recommendations?
The best advice i can give you on the Dakota is change out the carburetor..they are junk..they have the worst problems..id know i had two 1989 and 1990 Dakota's and i put efi on them and the truck worked great..good luck
one the other side it sounds like the truck is well worth fixing..is it 4x4?
Reply:It sounds very good deal.
Change all the fluids (and filters as appropriate): transmission, rear end, brakes, power steering, oil, coolant.
Make sure the brakes work properly.
You will probably need new tires - LT type tires last longer, are a bit more expensive and ride harder than P type tires.
Replace the fan/accessory drive belts.
C++ programming help?
Write a program that uses a random number generator to create sentences. The program should use four arrays of pointers to char called article[], noun[], verb[], and preposition[]. The program should create a sentence by selecting a word at random from each of the arrays in the following order: article[], noun[], verb[], preposition[], article[], noun[]. As each word is picked, it should be concatenated to the previous words in an array which is large enough to hold the entire sentence. The words should be separated by spaces. When the final sentence is output, it should start with a capital letter and end with a period.
The arrays should be filled as follows: article[] should contain "the", "a", "one", "some", and "any"; noun[] should contain "boy", "girl", "dog", "town", and "car"; verb[] should contain "drove", "jumped", "ran", "walked", and "skipped"; and preposition[] should contain "to", "from", "over", "under", and "on".
i just need started
C++ programming help?
gr8 question dude,but y do u thnk dat someones going to waste so much time and energy doing dat.u shud consult some professional guy ,here
The arrays should be filled as follows: article[] should contain "the", "a", "one", "some", and "any"; noun[] should contain "boy", "girl", "dog", "town", and "car"; verb[] should contain "drove", "jumped", "ran", "walked", and "skipped"; and preposition[] should contain "to", "from", "over", "under", and "on".
i just need started
C++ programming help?
gr8 question dude,but y do u thnk dat someones going to waste so much time and energy doing dat.u shud consult some professional guy ,here
Need help with a turbo C program?
Well you see I am trying to make a program with pointers in which it counts the number of occurrences of any two vowels in succession in a line of text by using pointers.For example
"Please read this application and give me gratuity". Such occurences are ea,ea,ui.
And in case anyone knows from where this program has been taken,please do tell:)
Need help with a turbo C program?
You didn't explain whether u wanted 'aaee' to be counted as 2 or 3. I assume it to be 3 as aa,ae,ee. The code assuming this is:
#include%26lt;stdio.h%26gt;
#include%26lt;string.h%26gt;
int isVowel(char a)
{
if(a%26gt;64%26amp;%26amp;a%26lt;91)
a+=32;
if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u...
return 1;
else return 0;
}
int main()
{
char *a="Please read this application and give me gratuity";
int i=0, count=0;
while(a[i+1]!='\0')
{
if(isVowel(a[i])%26amp;%26amp;isVowel(a[i+1]))
{printf("Occurence no %d: %c%c",i+1,a[i],a[i+1]);
count++;}
i++;
}
printf("The desired count is %d", count);
return 0;
}
Reply:if you dont like programming and would rather cheat than even attempt it, drop the class or get a new major like English Lit :)
Reply:Please look at the comments. Try to follow the logic. Plug in a sample word or phrase. Notice how the program processes the input at each stage of its execution.
Note: Below, I did not know whether you want a user to input a string, or just program so that the line of text is directly assigned to a pointer:
char * copy_str = "Please read this application and give me gratuity"
I allowed for user input of text, which I assigned to a character array. I subsequently copied that array into a character pointer—for further processing.
If you wish, you can replace all code located between the two lines of asteriks (*'s) with the above * copy_str assignment statement. Simply place the assignment immediately above the While clause.
___________________________
#include %26lt;stdio.h%26gt;
#include %26lt;string.h%26gt;
int main()
{
int i;
int count = 0;
int singleVowel = 0;
/*************************************...
/* 50 is space enough for text and terminating character. */
char buffer[50];
printf("Enter a line of text: ");
fgets(buffer, sizeof(buffer), stdin);
/* Copy input into a character pointer for further processing. */
/* First, allocate memory; and, then do the copying. */
char * copy_str = malloc( strlen(buffer) + 1);
strcpy(copy_str, buffer);
/*************************************...
/* Now, lets iterate through each character in the string. */
while (*copy_str++ != '\0')
{
switch(*copy_str)
{
/* Check for a vowel. */
case 'a': case 'e': case 'i': case 'o': case 'u':
case 'A': case 'E': case 'I': case 'O': case 'U':
/* We have found a vowel; */
/* so, check to see if the preceding character was a vowel */
if (singleVowel = =1)
/* Increase the count of consecutive vowels */
count++;
else
/* Here, the preceding character was not a vowel */
/* If the next character is a vowel, */
/* then it will counts as being a consecutive vowel. */
singleVowel = 1;
default:
/* This particular character is not a vowel. */
/* So, any next vowel will not be a consecutive one */
singleVowel = 0;
}
}
printf("In text, we have %d consecutive vowels.\n", count);
return 0;
}
________________________
"Please read this application and give me gratuity". Such occurences are ea,ea,ui.
And in case anyone knows from where this program has been taken,please do tell:)
Need help with a turbo C program?
You didn't explain whether u wanted 'aaee' to be counted as 2 or 3. I assume it to be 3 as aa,ae,ee. The code assuming this is:
#include%26lt;stdio.h%26gt;
#include%26lt;string.h%26gt;
int isVowel(char a)
{
if(a%26gt;64%26amp;%26amp;a%26lt;91)
a+=32;
if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u...
return 1;
else return 0;
}
int main()
{
char *a="Please read this application and give me gratuity";
int i=0, count=0;
while(a[i+1]!='\0')
{
if(isVowel(a[i])%26amp;%26amp;isVowel(a[i+1]))
{printf("Occurence no %d: %c%c",i+1,a[i],a[i+1]);
count++;}
i++;
}
printf("The desired count is %d", count);
return 0;
}
Reply:if you dont like programming and would rather cheat than even attempt it, drop the class or get a new major like English Lit :)
Reply:Please look at the comments. Try to follow the logic. Plug in a sample word or phrase. Notice how the program processes the input at each stage of its execution.
Note: Below, I did not know whether you want a user to input a string, or just program so that the line of text is directly assigned to a pointer:
char * copy_str = "Please read this application and give me gratuity"
I allowed for user input of text, which I assigned to a character array. I subsequently copied that array into a character pointer—for further processing.
If you wish, you can replace all code located between the two lines of asteriks (*'s) with the above * copy_str assignment statement. Simply place the assignment immediately above the While clause.
___________________________
#include %26lt;stdio.h%26gt;
#include %26lt;string.h%26gt;
int main()
{
int i;
int count = 0;
int singleVowel = 0;
/*************************************...
/* 50 is space enough for text and terminating character. */
char buffer[50];
printf("Enter a line of text: ");
fgets(buffer, sizeof(buffer), stdin);
/* Copy input into a character pointer for further processing. */
/* First, allocate memory; and, then do the copying. */
char * copy_str = malloc( strlen(buffer) + 1);
strcpy(copy_str, buffer);
/*************************************...
/* Now, lets iterate through each character in the string. */
while (*copy_str++ != '\0')
{
switch(*copy_str)
{
/* Check for a vowel. */
case 'a': case 'e': case 'i': case 'o': case 'u':
case 'A': case 'E': case 'I': case 'O': case 'U':
/* We have found a vowel; */
/* so, check to see if the preceding character was a vowel */
if (singleVowel = =1)
/* Increase the count of consecutive vowels */
count++;
else
/* Here, the preceding character was not a vowel */
/* If the next character is a vowel, */
/* then it will counts as being a consecutive vowel. */
singleVowel = 1;
default:
/* This particular character is not a vowel. */
/* So, any next vowel will not be a consecutive one */
singleVowel = 0;
}
}
printf("In text, we have %d consecutive vowels.\n", count);
return 0;
}
________________________
C programming!!!help!!!?
i cant understand clearly the uses of pointers arrays...what are macros??the preprocessor statements??
please briefly explain these to me...or give me some very USEFUL links....
thank you very much!!
C programming!!!help!!!?
Hint: google.com is very useful.
Macros: http://gcc.gnu.org/onlinedocs/cpp/Macros... %26gt;%26gt; found with "C Macros"
Preprocessor: http://gcc.gnu.org/onlinedocs/cpp/ %26gt;%26gt; found with "C Preprocessor"
Pointers and Arrays: http://c-faq.com/ %26gt;%26gt; I know this one but Google will get it for you as it is ridiculously popular and well known
Reply:pointer-it is a variable which stores the address of the that variable to which it points.
for eg-int*j
j=%26amp;a;
now when you print j it wiil show you the address of a
and when you print *j it will show you the value of a.
arrays -the are used to store various values of same data type under common variable name.
macro-you can type a name in a program and define it above void main.during compilation where ever the name ccurs the definition is placed tis is macro.
what i would suggest you isif u live in india then you buy yashavant kanetkar(let us c) if you are a bigenner.
if you want to form strong basis in pointers you should go for-
pointers in c(yashavant kanetkar).it is a thin book.
the books r written in easy language.
90% computer studying college students(Indian) recommend this book for beginners.
magnolia
please briefly explain these to me...or give me some very USEFUL links....
thank you very much!!
C programming!!!help!!!?
Hint: google.com is very useful.
Macros: http://gcc.gnu.org/onlinedocs/cpp/Macros... %26gt;%26gt; found with "C Macros"
Preprocessor: http://gcc.gnu.org/onlinedocs/cpp/ %26gt;%26gt; found with "C Preprocessor"
Pointers and Arrays: http://c-faq.com/ %26gt;%26gt; I know this one but Google will get it for you as it is ridiculously popular and well known
Reply:pointer-it is a variable which stores the address of the that variable to which it points.
for eg-int*j
j=%26amp;a;
now when you print j it wiil show you the address of a
and when you print *j it will show you the value of a.
arrays -the are used to store various values of same data type under common variable name.
macro-you can type a name in a program and define it above void main.during compilation where ever the name ccurs the definition is placed tis is macro.
what i would suggest you isif u live in india then you buy yashavant kanetkar(let us c) if you are a bigenner.
if you want to form strong basis in pointers you should go for-
pointers in c(yashavant kanetkar).it is a thin book.
the books r written in easy language.
90% computer studying college students(Indian) recommend this book for beginners.
magnolia
C++ program help?
i want to write a function that get the size and the max element in an array using pointers , plz help me !!
C++ program help?
This is a pretty good exercise to learn a few things about pointers. The somewhat tricky part of this is that your function doesn't know how big the array is; actually, you want it to tell you how big it is. Kind of silly, since the caller is likely to know the size already, but hey, it's just an exercise. One approach, as I've done below, is to have a well known value that marks the end of the array. Slightly more clever would be to have the caller pass in the end marker to the function, rather than having it be a global.
Note also that there's nothing particularly C++ - ish about this code. Except for the cout statement, it's C.
If this is for an assignment, don't just turn in my code as if it were your own. Study my code, learn something, then code it for yourself. Since this is such fundamental stuff, your code may look a lot like mine, which is ok.
#include %26lt;iostream%26gt;
#include %26lt;climits%26gt;
using namespace std;
void sizeMax(int *, unsigned *, int *);
static const int END = 0xDEAD;
int data[] = { 10, 3, 42, 1, -1, 11, 0, END };
int main(int argc, char *argv[]) {
unsigned size;
int max;
sizeMax(data,%26amp;size,%26amp;max);
cout %26lt;%26lt; "size = " %26lt;%26lt; size %26lt;%26lt; ", max = " %26lt;%26lt; max %26lt;%26lt; endl;
return 0;
}
void sizeMax(int *a, unsigned *size, int *max) {
int *p;
*size = 0;
*max = INT_MIN;
for (p = a; *p != END; p++, (*size)++) {
if (*p %26gt; *max) *max = *p;
}
}
Reply:#include %26lt;stdio.h%26gt;
#include %26lt;limits.h%26gt;
// macro to determine size of an array
#define SizeofArray(a) ((sizeof(a) %26gt; 0) ? (sizeof(a)/sizeof(*a)) : 0)
void GetMaxAndSize(int * pArray, int %26amp; nSize, int nMax)
{
nSize = SizeofArray(pArray);
nMax = INT_MIN;
int nIndex;
for(nIndex = 0; nIndex %26lt; nSize; nIndex++)
{
if(nMax %26lt; *pArray) nMax = *pArray;
pArray += 1;
}
}
// example
int Numbers[]={1,2,3,4,5,6,7,8,9,10};
int main(int argc, char* argv[])
{
int nSize;
int nMax;
GetMaxAndSize(Numbers, nSize, nMax);
return 0;
}
C++ program help?
This is a pretty good exercise to learn a few things about pointers. The somewhat tricky part of this is that your function doesn't know how big the array is; actually, you want it to tell you how big it is. Kind of silly, since the caller is likely to know the size already, but hey, it's just an exercise. One approach, as I've done below, is to have a well known value that marks the end of the array. Slightly more clever would be to have the caller pass in the end marker to the function, rather than having it be a global.
Note also that there's nothing particularly C++ - ish about this code. Except for the cout statement, it's C.
If this is for an assignment, don't just turn in my code as if it were your own. Study my code, learn something, then code it for yourself. Since this is such fundamental stuff, your code may look a lot like mine, which is ok.
#include %26lt;iostream%26gt;
#include %26lt;climits%26gt;
using namespace std;
void sizeMax(int *, unsigned *, int *);
static const int END = 0xDEAD;
int data[] = { 10, 3, 42, 1, -1, 11, 0, END };
int main(int argc, char *argv[]) {
unsigned size;
int max;
sizeMax(data,%26amp;size,%26amp;max);
cout %26lt;%26lt; "size = " %26lt;%26lt; size %26lt;%26lt; ", max = " %26lt;%26lt; max %26lt;%26lt; endl;
return 0;
}
void sizeMax(int *a, unsigned *size, int *max) {
int *p;
*size = 0;
*max = INT_MIN;
for (p = a; *p != END; p++, (*size)++) {
if (*p %26gt; *max) *max = *p;
}
}
Reply:#include %26lt;stdio.h%26gt;
#include %26lt;limits.h%26gt;
// macro to determine size of an array
#define SizeofArray(a) ((sizeof(a) %26gt; 0) ? (sizeof(a)/sizeof(*a)) : 0)
void GetMaxAndSize(int * pArray, int %26amp; nSize, int nMax)
{
nSize = SizeofArray(pArray);
nMax = INT_MIN;
int nIndex;
for(nIndex = 0; nIndex %26lt; nSize; nIndex++)
{
if(nMax %26lt; *pArray) nMax = *pArray;
pArray += 1;
}
}
// example
int Numbers[]={1,2,3,4,5,6,7,8,9,10};
int main(int argc, char* argv[])
{
int nSize;
int nMax;
GetMaxAndSize(Numbers, nSize, nMax);
return 0;
}
C++ hourglass loop?
I'm attempting to write a program that makes an hourglass design using asterisks (*).The user inputs a number of rows and the program makes the hourglass based on how many rows are specified.
Here is an example: This would show if 5 was entered.
*****
-***
--*
-***
*****
This is what I have so far:
int main()
{
int n, rows;
cout %26lt;%26lt; "Enter number of rows (no more than 23):" %26lt;%26lt; flush;
cin %26gt;%26gt; rows;
for (n = 1; n %26lt;= rows; n++)
{
if (n %26lt;= rows)
cout %26lt;%26lt; '*' %26lt;%26lt; flush;
}
if ((rows + 1) % 2)
cout %26lt;%26lt; '*' %26lt;%26lt; flush;
else
cout %26lt;%26lt; " " %26lt;%26lt; flush;
return 0;
This amount of code gets me the first line of *'s. I can only use cntrl structures: if, if else, switch, while, for, do-while; and can only use single characters and single spaces. I'm not looking for the exact code because I do want to learn this, but I am stuck and any pointers would be greatly appreciated
C++ hourglass loop?
#include "CHourGlass.h"
#include %26lt;string%26gt;
#include %26lt;iostream%26gt;
using namespace std;
CHourGlass::CHourGlass(int aRows)
{
if( aRows %26lt; 3 || aRows %26gt; 23 )
throw new string("row number violation");
m_height = aRows;
m_width = 1+((aRows/2)*2);
}
CHourGlass::~CHourGlass()
{
}
void CHourGlass::display()
{
int iWidth = m_width;
for( int i = 0; i%26lt; m_height;i++)
{
cout %26lt;%26lt; center(abs(iWidth))%26lt;%26lt; endl;
iWidth-=2;
if( iWidth == -1)
iWidth -=2;
}
}
string CHourGlass::center( int iCount)
{
int iSpace = (m_width-iCount)/2;
string result = string(iSpace,' ')+string(iCount, '*');
return result;
}
Reply:The first thing you need to do is identify the algorithm/relationship that you want your program to reflect. For example, given the number of rows the user wants, how do you calculate the number of stars each row will have? From your example of 5 rows it appears that you do:
5
5-2
5-2-2
5-2
5
Which would reflect an hourglass, however what if you only have 4 or 3 or 2 rows?
Identify this first and your program will easily fall into place.
Good luck!
Here is an example: This would show if 5 was entered.
*****
-***
--*
-***
*****
This is what I have so far:
int main()
{
int n, rows;
cout %26lt;%26lt; "Enter number of rows (no more than 23):" %26lt;%26lt; flush;
cin %26gt;%26gt; rows;
for (n = 1; n %26lt;= rows; n++)
{
if (n %26lt;= rows)
cout %26lt;%26lt; '*' %26lt;%26lt; flush;
}
if ((rows + 1) % 2)
cout %26lt;%26lt; '*' %26lt;%26lt; flush;
else
cout %26lt;%26lt; " " %26lt;%26lt; flush;
return 0;
This amount of code gets me the first line of *'s. I can only use cntrl structures: if, if else, switch, while, for, do-while; and can only use single characters and single spaces. I'm not looking for the exact code because I do want to learn this, but I am stuck and any pointers would be greatly appreciated
C++ hourglass loop?
#include "CHourGlass.h"
#include %26lt;string%26gt;
#include %26lt;iostream%26gt;
using namespace std;
CHourGlass::CHourGlass(int aRows)
{
if( aRows %26lt; 3 || aRows %26gt; 23 )
throw new string("row number violation");
m_height = aRows;
m_width = 1+((aRows/2)*2);
}
CHourGlass::~CHourGlass()
{
}
void CHourGlass::display()
{
int iWidth = m_width;
for( int i = 0; i%26lt; m_height;i++)
{
cout %26lt;%26lt; center(abs(iWidth))%26lt;%26lt; endl;
iWidth-=2;
if( iWidth == -1)
iWidth -=2;
}
}
string CHourGlass::center( int iCount)
{
int iSpace = (m_width-iCount)/2;
string result = string(iSpace,' ')+string(iCount, '*');
return result;
}
Reply:The first thing you need to do is identify the algorithm/relationship that you want your program to reflect. For example, given the number of rows the user wants, how do you calculate the number of stars each row will have? From your example of 5 rows it appears that you do:
5
5-2
5-2-2
5-2
5
Which would reflect an hourglass, however what if you only have 4 or 3 or 2 rows?
Identify this first and your program will easily fall into place.
Good luck!
C++ help please?
all i need to do is get started
Write a program that uses a random number generator to display one of 20 phrases stored in an array of char pointers. Let the user keep asking for phrases as long as desired
C++ help please?
you have nice legs...
Reply:do you have a specific question?
heres a hint on the random aspect:
srand( time( NULL ) ) ;
int idx = 19 * static_cast%26lt;double%26gt;(rand() / RAND_MAX) ;
Write a program that uses a random number generator to display one of 20 phrases stored in an array of char pointers. Let the user keep asking for phrases as long as desired
C++ help please?
you have nice legs...
Reply:do you have a specific question?
heres a hint on the random aspect:
srand( time( NULL ) ) ;
int idx = 19 * static_cast%26lt;double%26gt;(rand() / RAND_MAX) ;
C++ - using a vector inside of a Node?
I'm trying to use a vector to keep a list inside of a node...the node class is going to be used in a graph, as each node or point in the graph, and the vector is going to be used as an array of "next" pointers to the other nodes in the graph.
However, I don't really know how to implement this...I have listed this as a value in the Node class:
vector%26lt;pair%26lt;Node%26lt;T%26gt;*,int%26gt; %26gt; paths;
and my constructor for a default node is as follows:
template %26lt;typename T%26gt;
Node%26lt;T%26gt;::Node()
: place(""), value(0), pathdata(NULL, 0), paths(NULL)
{
}
So I want the vector for each node to be called paths, but whenever I try to use paths inside of a method, such as add a path or remove a path (from the vector), I try calling paths.push_back() or paths.erase() and when I compile it, it says "paths not in scope."
How can I fix this?
C++ - using a vector inside of a Node?
I'm not sure about your exact compile error, but I know the VC++ compiler can get very confused when STL containers contain other STL containers. It seems to get confused about mataching up multiple %26lt; %26gt;. The way to get around this is to use spaces when you declare the container of containers. Experiment with adding a space after vector%26lt; (before pair), amd maybe even a space before Node. (Sorry, I'm not at a computer with a compiler to do the experiment myself)
Reply:what's your compiler?
Try to invoke paths via this pointer..
this-%26gt;paths.push_back() ...
However, I don't really know how to implement this...I have listed this as a value in the Node class:
vector%26lt;pair%26lt;Node%26lt;T%26gt;*,int%26gt; %26gt; paths;
and my constructor for a default node is as follows:
template %26lt;typename T%26gt;
Node%26lt;T%26gt;::Node()
: place(""), value(0), pathdata(NULL, 0), paths(NULL)
{
}
So I want the vector for each node to be called paths, but whenever I try to use paths inside of a method, such as add a path or remove a path (from the vector), I try calling paths.push_back() or paths.erase() and when I compile it, it says "paths not in scope."
How can I fix this?
C++ - using a vector inside of a Node?
I'm not sure about your exact compile error, but I know the VC++ compiler can get very confused when STL containers contain other STL containers. It seems to get confused about mataching up multiple %26lt; %26gt;. The way to get around this is to use spaces when you declare the container of containers. Experiment with adding a space after vector%26lt; (before pair), amd maybe even a space before Node. (Sorry, I'm not at a computer with a compiler to do the experiment myself)
Reply:what's your compiler?
Try to invoke paths via this pointer..
this-%26gt;paths.push_back() ...
C programming!!!help!!!?
i cant understand clearly the uses of pointers arrays...what are macros??the preprocessor statements??
please briefly explain these to me...or give me some very USEFUL links....
thank you very much!!
C programming!!!help!!!?
You can get some help from
http://expert.myitcareer.org/
jasmine
please briefly explain these to me...or give me some very USEFUL links....
thank you very much!!
C programming!!!help!!!?
You can get some help from
http://expert.myitcareer.org/
jasmine
Can anyone write c/c++ program for this binary tree problem??
There is a binary tree , a node having three pointers -- Left child, right child, parent. Now the problem is to delete the tree in top-down fashion ie First delete parent %26amp; then child.
Can anyone write c/c++ program for this binary tree problem??
how's this?:
typedef struct tree_struct
{
tree_struct *parent;
tree_struct *child_right;
tree_struct *child_left;
} tree_struct;
void main(void)
{
tree_struct *root;
// create the root using malloc(), add branches to the tree.
// Null pointers are assumed to indicate no child.
// now its time to free the tree in the manner you described (root-first)
free_tree(root);
}
void free_tree(tree_struct *tree)
{
tree_struct self;
self = *tree; // copy child pointers, note how parent is never used
free(tree);
if (self.child_right != NULL)
{
free_tree(self.child_right);
}
if (self.child_left != NULL)
{
free_tree(self.child_left);
}
}
Can anyone write c/c++ program for this binary tree problem??
how's this?:
typedef struct tree_struct
{
tree_struct *parent;
tree_struct *child_right;
tree_struct *child_left;
} tree_struct;
void main(void)
{
tree_struct *root;
// create the root using malloc(), add branches to the tree.
// Null pointers are assumed to indicate no child.
// now its time to free the tree in the manner you described (root-first)
free_tree(root);
}
void free_tree(tree_struct *tree)
{
tree_struct self;
self = *tree; // copy child pointers, note how parent is never used
free(tree);
if (self.child_right != NULL)
{
free_tree(self.child_right);
}
if (self.child_left != NULL)
{
free_tree(self.child_left);
}
}
I am having difficulty conceptualizing this problem. Could I get some pointers?
A metal sphere of radius R, carrying charge q, is surrounded by a thick concentric metal shell (inner radius a, outer radius b). The shell carries no net charge.
(A) Find the surface charge density R, at a, and at b.
(B) Find the potential at the center, using infinity as the reference point.
(C) Now the outer surface is touched to a grounding wire, which lowers its potential to zero (same as infinity). How do your answers (A) and (B) change?
I am having difficulty conceptualizing this problem. Could I get some pointers?
Stephie K did a pretty good job. But let me add a little more
For the metal shell, all of the charge q, at least to an outside observer, will appear as if it were on the outer surface of the shell. If you think about it, the strength of the field at this point is exactly what you would get if the shell was not there, basically q divided by the square of the distance or q/r^2 (where r is the radius of the shell)
What this means is that to balance the charge q on the outer surface, you need a -q charge on the inner surface of the shell. (This is because the shell, en total, carries no charge).
The potential at the center, visa vie infinite, remains the same before it had the shell
When you ground the shell, to the observer outside the shell, there is no charge, which means that the outside surface has no charge density.
But the shell has now aquired a charge of -q to balance the charge of q in the center. This charge is distributed across a, the inner surface, exactly like the example above.
Reply:I am no physicist but I wanted to tackle this anyway. So dont anybody embarass me if what I am saying is stupid %26lt;g%26gt; Besides, I think that a non-physicist perspective might be more helpful anyhow since a conceptual hurdle... So I looked up some physics online and this is my interpretation...The "surface charge density" is a formula that simplifies the energy being emitted by the sphere down to a unit area. So the total charge 'q' is divided by the total area (A= pi Rsquared) This is actually an average charge expected at any single point on the sphere. That makes this value q a hypothetical "point charge" which you must use in order to calculate the potential. The potential is basically the amount of energy you would predict over a set of points. In order to calculate potential you must first calculate the "electric field" E. The electric field is the way the charge is distributed among points. Its formula is a ratio of avg charge q and the distance between two points. Which for some reason the distance influence is weakened, it has to be divided into a fraction. For this case the points are infinity and center, which is where I get to a conceptual problem myself. I think the center can be considered as -R, or -a, or -b, if you imagine the surface as the starting line. Maybe infinity cancels and you just get radius by radius cubed (look up the formula for electric field at the source I noted below) Question (C) I really dont know except it seems like you should set potential to zero in a formula and then see if the electric field E changes but it feels to me that only the surface loses charge and the energy has to go somewhere else so it could increase elsewhere. OKAY perhaps this is an exercise in futility but I'll be the first to admit I have nothing better to do right now. Good Luck. I am really curious just how wrong I am.
(A) Find the surface charge density R, at a, and at b.
(B) Find the potential at the center, using infinity as the reference point.
(C) Now the outer surface is touched to a grounding wire, which lowers its potential to zero (same as infinity). How do your answers (A) and (B) change?
I am having difficulty conceptualizing this problem. Could I get some pointers?
Stephie K did a pretty good job. But let me add a little more
For the metal shell, all of the charge q, at least to an outside observer, will appear as if it were on the outer surface of the shell. If you think about it, the strength of the field at this point is exactly what you would get if the shell was not there, basically q divided by the square of the distance or q/r^2 (where r is the radius of the shell)
What this means is that to balance the charge q on the outer surface, you need a -q charge on the inner surface of the shell. (This is because the shell, en total, carries no charge).
The potential at the center, visa vie infinite, remains the same before it had the shell
When you ground the shell, to the observer outside the shell, there is no charge, which means that the outside surface has no charge density.
But the shell has now aquired a charge of -q to balance the charge of q in the center. This charge is distributed across a, the inner surface, exactly like the example above.
Reply:I am no physicist but I wanted to tackle this anyway. So dont anybody embarass me if what I am saying is stupid %26lt;g%26gt; Besides, I think that a non-physicist perspective might be more helpful anyhow since a conceptual hurdle... So I looked up some physics online and this is my interpretation...The "surface charge density" is a formula that simplifies the energy being emitted by the sphere down to a unit area. So the total charge 'q' is divided by the total area (A= pi Rsquared) This is actually an average charge expected at any single point on the sphere. That makes this value q a hypothetical "point charge" which you must use in order to calculate the potential. The potential is basically the amount of energy you would predict over a set of points. In order to calculate potential you must first calculate the "electric field" E. The electric field is the way the charge is distributed among points. Its formula is a ratio of avg charge q and the distance between two points. Which for some reason the distance influence is weakened, it has to be divided into a fraction. For this case the points are infinity and center, which is where I get to a conceptual problem myself. I think the center can be considered as -R, or -a, or -b, if you imagine the surface as the starting line. Maybe infinity cancels and you just get radius by radius cubed (look up the formula for electric field at the source I noted below) Question (C) I really dont know except it seems like you should set potential to zero in a formula and then see if the electric field E changes but it feels to me that only the surface loses charge and the energy has to go somewhere else so it could increase elsewhere. OKAY perhaps this is an exercise in futility but I'll be the first to admit I have nothing better to do right now. Good Luck. I am really curious just how wrong I am.
Need help with the last line using c i keep getting an error?
#include %26lt;stdio.h%26gt;
#include %26lt;string.h%26gt;
#include %26lt;ctype.h%26gt;
// Our function declaration saying it takes one string pointer and returns one string pointer.
char * flipstring(char *stringtoflip);
int main() {
// Strings to hold our lines (forward and backward)
char string[256];
char flipped[256];
// Our file pointers (one in and one out)
FILE * infile;
FILE * outfile;
// Open files to valid txt files
infile = fopen("input.txt","r");
outfile = fopen("output.txt","w");
// Loop through the input file reading each line up to 256 chars
while (fgets(string,256,infile) != NULL) {
printf("The value read in is: %s\n", string);
// Flip the string and copy it to our "flipped" string
strcpy(flipped,flipstring(string));
// Write "flipped" to output
printf("The value written is: %s\n",flipped);
fputs(flipped,outfile);
}
Need help with the last line using c i keep getting an error?
This is a good warning, it could cause a crash to return the address of a local variable, because when the funtion terminates the local variables terminate with them. Static variables can be used to illiminate this problem.
You could also instead of returning the string, accept a pointer to a string as an argument.
But remember, when a local variable is allocated into memory, it is only in memory while the function is running. Once the function stops, the memory is erased and your pointer is no longer valid.
Reply:Declaring reverse[256] as global should do it, but then I get seg fault.
#include%26lt;....%26gt;
#include%26lt;....%26gt;
...
char * flipstring(char *stringtoflip);
char reverse[256]; //Now this is global, not local
int main()
{
//Stuff
return 0;
}
char * flipstring(char *stringtoflip)
{
/*same, just remove the line "char reverse[256]" as it has been done earlier*/
........
.......
....
return reverse; //this time reverse is global not local
}
But I get a seg fault, probably there is some more errors in this code.
#include %26lt;string.h%26gt;
#include %26lt;ctype.h%26gt;
// Our function declaration saying it takes one string pointer and returns one string pointer.
char * flipstring(char *stringtoflip);
int main() {
// Strings to hold our lines (forward and backward)
char string[256];
char flipped[256];
// Our file pointers (one in and one out)
FILE * infile;
FILE * outfile;
// Open files to valid txt files
infile = fopen("input.txt","r");
outfile = fopen("output.txt","w");
// Loop through the input file reading each line up to 256 chars
while (fgets(string,256,infile) != NULL) {
printf("The value read in is: %s\n", string);
// Flip the string and copy it to our "flipped" string
strcpy(flipped,flipstring(string));
// Write "flipped" to output
printf("The value written is: %s\n",flipped);
fputs(flipped,outfile);
}
Need help with the last line using c i keep getting an error?
This is a good warning, it could cause a crash to return the address of a local variable, because when the funtion terminates the local variables terminate with them. Static variables can be used to illiminate this problem.
You could also instead of returning the string, accept a pointer to a string as an argument.
But remember, when a local variable is allocated into memory, it is only in memory while the function is running. Once the function stops, the memory is erased and your pointer is no longer valid.
Reply:Declaring reverse[256] as global should do it, but then I get seg fault.
#include%26lt;....%26gt;
#include%26lt;....%26gt;
...
char * flipstring(char *stringtoflip);
char reverse[256]; //Now this is global, not local
int main()
{
//Stuff
return 0;
}
char * flipstring(char *stringtoflip)
{
/*same, just remove the line "char reverse[256]" as it has been done earlier*/
........
.......
....
return reverse; //this time reverse is global not local
}
But I get a seg fault, probably there is some more errors in this code.
Segmentation fault in C program?
this program is for sorting the file and displaying it on monitor...........
this is working nice in window but give segmentation fault in unix
i m storing address of strings in array of pointers..and then sorting it with bubble sort
here is the small part of program
buffer is for storing strings
pS is array of string pointers
if u want whole program for debuggin mail me ank_rishi23@yahoo.com
while((*fgets(buffer,(BUFFER_LEN-1),fp... != '\0') %26amp;%26amp; (i %26lt; NUM_P))
{
pS[i] = (char*)malloc(strlen(buffer) + 1);
if(pS[i]==NULL) /* Check for no memory allocated */
{
printf(" Memory allocation failed. Program terminated.\n");
return;
}
strcpy(pS[i++], buffer);
}
last_string = i;
where can be segmentation fault...........?? plz find.....
Segmentation fault in C program?
since its working on windows, the segmentation fault could be that unix does not recognize something in it.
from what i know, windows and unix have different ways of representing data. some have larger sizes.
so the error could be in the size. check the malloc to see if its causing the segmentation fault
Reply:May is virus ``KIlls virus `` `
You have two memory? Have a memory problem of the ``
I think you ,so going to http://www.ePathChina.com
crab apple
this is working nice in window but give segmentation fault in unix
i m storing address of strings in array of pointers..and then sorting it with bubble sort
here is the small part of program
buffer is for storing strings
pS is array of string pointers
if u want whole program for debuggin mail me ank_rishi23@yahoo.com
while((*fgets(buffer,(BUFFER_LEN-1),fp... != '\0') %26amp;%26amp; (i %26lt; NUM_P))
{
pS[i] = (char*)malloc(strlen(buffer) + 1);
if(pS[i]==NULL) /* Check for no memory allocated */
{
printf(" Memory allocation failed. Program terminated.\n");
return;
}
strcpy(pS[i++], buffer);
}
last_string = i;
where can be segmentation fault...........?? plz find.....
Segmentation fault in C program?
since its working on windows, the segmentation fault could be that unix does not recognize something in it.
from what i know, windows and unix have different ways of representing data. some have larger sizes.
so the error could be in the size. check the malloc to see if its causing the segmentation fault
Reply:May is virus ``KIlls virus `` `
You have two memory? Have a memory problem of the ``
I think you ,so going to http://www.ePathChina.com
crab apple
Question about command line arguments for C/C++, argv?
int main (int argc, char* argv[])
ok in this case,,, argv[] is supposed to be an array of pointers pointing to input
why is it possible to say
puts(argv[1])? //putstring
if argv is an array of pointers, wouldn't that print a memory address? but why then does it actually print the actual argument passed.
Don't we need to dereference it first... like
puts(*argv[1])?
I would greatly appreciate your help. Thanks!
Question about command line arguments for C/C++, argv?
You are correct in your understanding that argv is an array of pointers. So argv[1] is just a pointer. There are two critical insights to understanding this.
Critical insight #1: In C and C++, a pointer can be used as an array. So if you have a char*, that can point to either a single character, or to an array. Because of this, if you have "char *a;", the statements "*a" and "a[0]" are exactly the same thing. (Of course, you can't say "a[1]" if a is just a pointer to a single character. The results will be undefined.)
Critical insight #2: In C, strings (referred to in C++ as "C-style strings" to distinguish them from C++'s std::string class) are just arrays of characters. And when you pass a string (that is, a "char*") to puts(), the string itself is printed out, not its address.
Thus, if you say
char *foo = "bar"; puts(foo);
you will see "bar" as the program's output. Likewise, if you say
char *foo = argv[1]; puts(foo);
you will see the second argument to the program. (Why the second? Because argv[0] is the first argument.)
Something important to remember is that puts() will only print out strings. If you say "puts(3)" or "puts(argv)" your code won't compile. puts() always does the dereferencing on its own.
Reply:argv[1] stores address but *argv[1] gives the value stored at argv[1] address
Reply:It's not "an array of pointers pointing to input". It's actually a vector (or array) of char* (or strings) so each element in the vector is a null terminated string.
argv[0] is the program name
argv[1] is the first parameter passed to the program (separated by spaces)
and so on.
Hope that helps!!
ok in this case,,, argv[] is supposed to be an array of pointers pointing to input
why is it possible to say
puts(argv[1])? //putstring
if argv is an array of pointers, wouldn't that print a memory address? but why then does it actually print the actual argument passed.
Don't we need to dereference it first... like
puts(*argv[1])?
I would greatly appreciate your help. Thanks!
Question about command line arguments for C/C++, argv?
You are correct in your understanding that argv is an array of pointers. So argv[1] is just a pointer. There are two critical insights to understanding this.
Critical insight #1: In C and C++, a pointer can be used as an array. So if you have a char*, that can point to either a single character, or to an array. Because of this, if you have "char *a;", the statements "*a" and "a[0]" are exactly the same thing. (Of course, you can't say "a[1]" if a is just a pointer to a single character. The results will be undefined.)
Critical insight #2: In C, strings (referred to in C++ as "C-style strings" to distinguish them from C++'s std::string class) are just arrays of characters. And when you pass a string (that is, a "char*") to puts(), the string itself is printed out, not its address.
Thus, if you say
char *foo = "bar"; puts(foo);
you will see "bar" as the program's output. Likewise, if you say
char *foo = argv[1]; puts(foo);
you will see the second argument to the program. (Why the second? Because argv[0] is the first argument.)
Something important to remember is that puts() will only print out strings. If you say "puts(3)" or "puts(argv)" your code won't compile. puts() always does the dereferencing on its own.
Reply:argv[1] stores address but *argv[1] gives the value stored at argv[1] address
Reply:It's not "an array of pointers pointing to input". It's actually a vector (or array) of char* (or strings) so each element in the vector is a null terminated string.
argv[0] is the program name
argv[1] is the first parameter passed to the program (separated by spaces)
and so on.
Hope that helps!!
I have an interview with office depot need some pointers?
i have an interview coming up i have went to school for a year to become a medical assistant i graduated about 5 mths ago i never took my certification test i had already had a call center job availble and had just got my apt so i needed a job quick to pay bills i just stayed at that job until i got terminated last month for attendance so on my application i just listed my last two jobs and it looks as if i didnt work since last year which is fine b/c i was in school and also having transportation issues but i dont know what to tell the interviewer about the field i graduated in he's going to want to know why im not working in my field truth is i dont feel confident enough to work in it yet i went to a 1yr college and i am going back to school to be an RN but i want to maybe sometime next year get a medical assistant job i just need work right now what should i tell him about that?
I have an interview with office depot need some pointers?
Most companies unless they have a huge turnover and don't mind (like McDonald's, Burger King, supermarkets) will not want to hire someone that they will have to spend time to teach only to leave and have to retrain someone else.
You may mention that you are attending school part-time or taking time off from school to work for awhile, but if they're not especially desparate to hire, or if there are many other people out there vying for the same position, I would not mention school.
I have an interview with office depot need some pointers?
Most companies unless they have a huge turnover and don't mind (like McDonald's, Burger King, supermarkets) will not want to hire someone that they will have to spend time to teach only to leave and have to retrain someone else.
You may mention that you are attending school part-time or taking time off from school to work for awhile, but if they're not especially desparate to hire, or if there are many other people out there vying for the same position, I would not mention school.
C/C++ - nested objects/structs question?
I have a great idea of how to implement an algebra solving/simplfying program, but I need it to have a structure within itself. Here's what I mean:
struct thing {
thing *t1;
thing *t2;
int other;
};
As you can see, the struct uses itself, and therefore cannot define 'thing' until it is finished, making a sort of catch 22. Is there a way to do something like this? All it needs to do is store two pointers to other instances of the same data type and one integer. If it is possible with a class, that would work too.
The code can be completely different, as long as it does what I described or gives an alternate method.
C/C++ - nested objects/structs question?
Well my C is a bit rusty but I know it is officially impossible to declare a structure containing an instance of itself....talk about endless loop! so doubt C++ would allow it either as physically impossible.
Couldn't you make a small array to hold the pointers and int? you could use an ordinary do-while to loop through?
Reply:Pointers to similar structures or classes is a common concept in data structures. This is how things such as linked lists or trees. They have a structure with a pointer the same structure for the next one in the list or the children in the tree. Look up linked list in wikipedia to see what I mean.
Anyways, here is some code demonstrating what you want to do. This is in C, but you can do similar things with classes in C++. I also played with the variables a bit to demonstrate different ways of accessing the data.
#include %26lt;stdio.h%26gt;
//get the compiler to recognize Thing as its own data type
typedef struct Thing Thing;
//define the struct
struct Thing {
Thing *first;
Thing *second;
int val;
};
int main()
{
Thing o1;
Thing o2;
Thing o3;
Thing *p4;
Thing *p5;
Thing *p6;
//dynamicall created Things
p4 = (Thing*)malloc(sizeof(Thing));
p5 = (Thing*)malloc(sizeof(Thing));
p6 = (Thing*)malloc(sizeof(Thing));
o1.first = %26amp;o2;
o1.second = %26amp;o3;
o1.val = 1;
o2.val = 2;
o1.second-%26gt;val = 3; // does same as o3.val = 3
p4-%26gt;first = p5;
p4-%26gt;second = p6;
p4-%26gt;val = 4;
p5-%26gt;val = 5;
p4-%26gt;second-%26gt;val = 6; // does same as p6-%26gt;val = 6;
printf("%d\n", o1.val);
printf("%d\n", o1.first-%26gt;val);//same as printing o2.val
printf("%d\n", o3.val);
printf("%d\n", p4-%26gt;val);
printf("%d\n", p4-%26gt;first-%26gt;val); //same as printing p5-%26gt;val
printf("%d\n", p6-%26gt;val);
//free dynamically created objects
free(p4);
free(p5);
free(p6);
return 0;
}
Reply:Use forward class/struct declaration, for example:
struct thing;
struct thing {
thing *t1;
thing *t2;
int other;
};
Reply:first thought : try the 'this' pointer in a class .. might work as such
#include %26lt;iostream%26gt;
using namespace std;
class many
{
public:
int integer1;
many *ptr;
many()
{
integer1 = 0;
ptr = this;
}
};
void main()
{
many o;
cout%26lt;%26lt;o.integer1%26lt;%26lt;endl;
cout%26lt;%26lt;o.ptr-%26gt;integer1%26lt;%26lt;endl;
}
struct thing {
thing *t1;
thing *t2;
int other;
};
As you can see, the struct uses itself, and therefore cannot define 'thing' until it is finished, making a sort of catch 22. Is there a way to do something like this? All it needs to do is store two pointers to other instances of the same data type and one integer. If it is possible with a class, that would work too.
The code can be completely different, as long as it does what I described or gives an alternate method.
C/C++ - nested objects/structs question?
Well my C is a bit rusty but I know it is officially impossible to declare a structure containing an instance of itself....talk about endless loop! so doubt C++ would allow it either as physically impossible.
Couldn't you make a small array to hold the pointers and int? you could use an ordinary do-while to loop through?
Reply:Pointers to similar structures or classes is a common concept in data structures. This is how things such as linked lists or trees. They have a structure with a pointer the same structure for the next one in the list or the children in the tree. Look up linked list in wikipedia to see what I mean.
Anyways, here is some code demonstrating what you want to do. This is in C, but you can do similar things with classes in C++. I also played with the variables a bit to demonstrate different ways of accessing the data.
#include %26lt;stdio.h%26gt;
//get the compiler to recognize Thing as its own data type
typedef struct Thing Thing;
//define the struct
struct Thing {
Thing *first;
Thing *second;
int val;
};
int main()
{
Thing o1;
Thing o2;
Thing o3;
Thing *p4;
Thing *p5;
Thing *p6;
//dynamicall created Things
p4 = (Thing*)malloc(sizeof(Thing));
p5 = (Thing*)malloc(sizeof(Thing));
p6 = (Thing*)malloc(sizeof(Thing));
o1.first = %26amp;o2;
o1.second = %26amp;o3;
o1.val = 1;
o2.val = 2;
o1.second-%26gt;val = 3; // does same as o3.val = 3
p4-%26gt;first = p5;
p4-%26gt;second = p6;
p4-%26gt;val = 4;
p5-%26gt;val = 5;
p4-%26gt;second-%26gt;val = 6; // does same as p6-%26gt;val = 6;
printf("%d\n", o1.val);
printf("%d\n", o1.first-%26gt;val);//same as printing o2.val
printf("%d\n", o3.val);
printf("%d\n", p4-%26gt;val);
printf("%d\n", p4-%26gt;first-%26gt;val); //same as printing p5-%26gt;val
printf("%d\n", p6-%26gt;val);
//free dynamically created objects
free(p4);
free(p5);
free(p6);
return 0;
}
Reply:Use forward class/struct declaration, for example:
struct thing;
struct thing {
thing *t1;
thing *t2;
int other;
};
Reply:first thought : try the 'this' pointer in a class .. might work as such
#include %26lt;iostream%26gt;
using namespace std;
class many
{
public:
int integer1;
many *ptr;
many()
{
integer1 = 0;
ptr = this;
}
};
void main()
{
many o;
cout%26lt;%26lt;o.integer1%26lt;%26lt;endl;
cout%26lt;%26lt;o.ptr-%26gt;integer1%26lt;%26lt;endl;
}
C/C++: Creating self-sufficient executables?
Hi!
I've tried to search online but I guess I don't have to right keywords in mind to find a satisfying result.
I have seen in the past software which seems to be self sufficient-- and by that I mean that every external library is included in the executable binary itself, so there are a few DLL's (besides the vital ones like mscrt, etc) needed by that program.
Considering I already have the source code of a certain library, is it possible to have it compiled and included in my final executable, rather than being a standalone DLL?
I dont need a in-depth actual explaination, but rather a few pointers (links, articles, manpages) to go into the right direction.
Thanks :)
C/C++: Creating self-sufficient executables?
Yes. DLLs are Dynamic Linking Libraries You want static libraries. Do a search on how to create (and use) static libaries for Windows with your compiler.
Reply:I can't tell you exactly because it depends on what compiler you are using and I don't remember exactly, but what you are looking for is how to compile without dependencies.
For certain compilers and frameworks (usually the microsoft ones) sometimes there will be DLL files you have no choice but distributing/using.
strawberry
I've tried to search online but I guess I don't have to right keywords in mind to find a satisfying result.
I have seen in the past software which seems to be self sufficient-- and by that I mean that every external library is included in the executable binary itself, so there are a few DLL's (besides the vital ones like mscrt, etc) needed by that program.
Considering I already have the source code of a certain library, is it possible to have it compiled and included in my final executable, rather than being a standalone DLL?
I dont need a in-depth actual explaination, but rather a few pointers (links, articles, manpages) to go into the right direction.
Thanks :)
C/C++: Creating self-sufficient executables?
Yes. DLLs are Dynamic Linking Libraries You want static libraries. Do a search on how to create (and use) static libaries for Windows with your compiler.
Reply:I can't tell you exactly because it depends on what compiler you are using and I don't remember exactly, but what you are looking for is how to compile without dependencies.
For certain compilers and frameworks (usually the microsoft ones) sometimes there will be DLL files you have no choice but distributing/using.
strawberry
C programming: strcpy?
does strcpy make an actual copy of a string or just a pointer to the string that you are trying to copy? i'm writing a program where i pass a string into a method and the method uses strtok on the string i pass. however strtok modifies the string, which i don't want it to do. i guess i'm having trouble with my pointers and i thought strcpy might fix it but i'm still having the same problem. any suggestions on how to stop the method from modifying the string?
C programming: strcpy?
strcpy does make a deep copy of a c string. In fact, it copies the original string into the destination buffer, without much checking. For more on strcpy, look at http://www.cplusplus.com/reference/clibr...
As for processing your string you have 2 options. One is to make a copy of the original strign and use strtok on the modified string, like you attempted. Another alternative is to implement, from scrath, the parsing functionality you desire, without modifying the original string.
PS: For security reasons, depending on what this code is for, I would not use strcpy. strncpy and even memcpy are safer.
C programming: strcpy?
strcpy does make a deep copy of a c string. In fact, it copies the original string into the destination buffer, without much checking. For more on strcpy, look at http://www.cplusplus.com/reference/clibr...
As for processing your string you have 2 options. One is to make a copy of the original strign and use strtok on the modified string, like you attempted. Another alternative is to implement, from scrath, the parsing functionality you desire, without modifying the original string.
PS: For security reasons, depending on what this code is for, I would not use strcpy. strncpy and even memcpy are safer.
C++ help plz?
i want to write a function that get the size of an array by using pointers , where i should make a pointer points at begin of the array and another one points at the end of the array , then i have to return the size of the array at last .
int size(double *begin,double *end), any help?
C++ help plz?
The previous answer does well to explain the idea of computing the difference in bytes between two addresses, and dividing by sizeof(double) to get the number of elements. It's good to understand that, but pointer arithmetic can simplify it greatly. This also works:
int size(double *begin, double *end) {
return end - begin + 1;
}
Assuming end points to the last element of the array. The size of what begin and end point to is built into the calculation, you get it for free.
Reply:C++ stores arrays by allocating a single continuous block of memory. So if you allocate ten doubles, you allocate a block of memory:
10 doubles * (8 bytes / double) = 80 bytes
Now the pointer gives you back the location of the first byte, so how you compute the size depends on exactly what "end" means.
There are actually several possibilities:
1.) If end is the location of the last byte, then for four doubles:
begin -%26gt; xxxxxxxx xxxxxxx xxxxxxxx xxxxxxxx %26lt;- end
The answer is ((end+1) - begin) / 8.
2.) If end is the location of the last double in the array, then for four doubles:
begin -%26gt; xxxxxxxx xxxxxxxx xxxxxxxx end-%26gt; xxxxxxxx
The answer is ((end - begin) / 8) + 1.
3.) If end is the location of the first byte after the array, then for four doubles:
begin -%26gt; xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx end -%26gt; x
This is the easiest case. The answer is (end - begin) / 8.
Imagine allocating a single double starting at location zero. Then you allocate bytes at address zero, one, two, ..., seven.
So if we allocate n objects, each of size s, then we allocate n*s bytes. If the first allocated address is f, then we allocate the following locations.
first = f + 0
last = f + n*s - 1
Hope this helps!
int size(double *begin,double *end), any help?
C++ help plz?
The previous answer does well to explain the idea of computing the difference in bytes between two addresses, and dividing by sizeof(double) to get the number of elements. It's good to understand that, but pointer arithmetic can simplify it greatly. This also works:
int size(double *begin, double *end) {
return end - begin + 1;
}
Assuming end points to the last element of the array. The size of what begin and end point to is built into the calculation, you get it for free.
Reply:C++ stores arrays by allocating a single continuous block of memory. So if you allocate ten doubles, you allocate a block of memory:
10 doubles * (8 bytes / double) = 80 bytes
Now the pointer gives you back the location of the first byte, so how you compute the size depends on exactly what "end" means.
There are actually several possibilities:
1.) If end is the location of the last byte, then for four doubles:
begin -%26gt; xxxxxxxx xxxxxxx xxxxxxxx xxxxxxxx %26lt;- end
The answer is ((end+1) - begin) / 8.
2.) If end is the location of the last double in the array, then for four doubles:
begin -%26gt; xxxxxxxx xxxxxxxx xxxxxxxx end-%26gt; xxxxxxxx
The answer is ((end - begin) / 8) + 1.
3.) If end is the location of the first byte after the array, then for four doubles:
begin -%26gt; xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx end -%26gt; x
This is the easiest case. The answer is (end - begin) / 8.
Imagine allocating a single double starting at location zero. Then you allocate bytes at address zero, one, two, ..., seven.
So if we allocate n objects, each of size s, then we allocate n*s bytes. If the first allocated address is f, then we allocate the following locations.
first = f + 0
last = f + n*s - 1
Hope this helps!
Help! I'm going to Small Claims Court Next Month Need Pointers...PLEASE!!?
Well technically I'm not going, but my friend is...She's taking her ex land lord to court b/c he refuses to give her back her deposit. She left the apartment in good condition even took several pictures and video of how the apartment was left before and after she moved out. Anyway, she never signed a contract just filled out and application. She even gave her landlord a 30 day moving notice...However, her landlord refuses to give her back her deposit b/c she was only living in the apartment less than 6 months so supposedly she forfeits the deposit?! I've never herd of this rule b4. That's why she's taking him to small claims next month... So do you think she has a chance of getting her money back?!? Should she take the pics to court? How about the video? Should she take it on a disk or show him from her camera? Your feed back is greatly appreciated....Thanks in advance...Best answers gets 10 points for sure!!! ;]
Help! I'm going to Small Claims Court Next Month Need Pointers...PLEASE!!?
Your friend is taking the correct steps to recover her deposit. The fact that she has proof of the condition prior and after is a good. I suggest that your friend prepare a written demand for the deposit with a written response on why the deposit is considered forfeited.
In small claims court, almost everything is admissible. It is more like peoples court you might see on TV.
The only thing I can see that would give the landlord cause to keep the deposit if there was a lease in place and the term of the lease was not upheld. The tenant is responsible for the remainder of the term until the unit is re-rented for the remainder of the term. Breaking the lease prior to the expiration of the term invokes this clause. Since there was no lease signed, the tenancy is considered month to month.
I assume that a move out inspection was conducted with the landlord and the landlord provided a clean report. Otherwise that would be the only area your friend is vulnerable. Technically (and if the landlord is unscrupulous) he could generate a report indication repairs that were needed that cant be shown in pictures or a video.
There are good and bad landlords out there. I personally am never offended when tenants ask for written correspondences from me. In fact I prefer to keep all communications between myself and my tenants in writing so that there is no misunderstanding.
Reply:10 Points LOL big dealllllll The question is how long she agreed to stay in the unit. and where it is located.
If she is college student in a College town, timing is a big deal
ALL my leases state plain and clear. "Moving out early forfeits any and all deposits, and prepaid rents".
I think that is pretty well standard in most leases..
She made an agreement, so she is in the wrong, Only thing in her favor is she can dispute the length of the lease agreed to... and fact she has no lease is something else, but if she signed application, might have some of the terms in it.
I have a young man now that is trying to move out after nine months because he is going to be gone this summer, and does not want to pay rent... But his lease says he has to pay, and even my web site says same thing... He will not get his deposit back, or any prepaid rent. Sometimes a landlord has to be a JERK, and this is one of them in my book, Else what good is a lease??
Reply:You're correct, she doesn't "forfeit" the deposit just because she was there less six months. I'm a landlord myself and I've never heard of that "law."
This assumes she doesn't have a lease. If she doesn't, she in effect has a month-to-month lease and can move out at any time, simply by giving a 30-day notice.
Note that in many states, her landlord actually owes her interest on her deposit too. Remember, it's her money... it's just a "deposit." Technically, many states can force a landlord to not only return the deposit, but the appropriate amount of interest as well. (It will be a very small amount, I'm sure. I wouldn't worry about this.)
An landlord can withhold a fair amount of the deposit for cleaning, to repair broken items, things like that. It sounds as if the judge will decide what is a fair amount. Her having pictures of the place after she left it, will help her. I don't know if the judge is going to want to look at a video. (Maybe.) So yes, definitely take the pictures to court.
How did she pay her landlord for this deposit? With a check? If so, can she prove it and can she prove how much she paid? Did the landlord give her a receipt? Have her bring all of these types of receipts too.
I can't believe she didn't sign any kind of a lease, though.
Reply:Have her check with the clerk or the judge's secretary regarding the admissability of the pictures and video. She should definitely bring them unless she is specifically told by the court or judge not to. I would have the pictures printed out and have 2 or 3 copies on disk (1 for landlord, 1 for court/judge). Same with the video.
Help! I'm going to Small Claims Court Next Month Need Pointers...PLEASE!!?
Your friend is taking the correct steps to recover her deposit. The fact that she has proof of the condition prior and after is a good. I suggest that your friend prepare a written demand for the deposit with a written response on why the deposit is considered forfeited.
In small claims court, almost everything is admissible. It is more like peoples court you might see on TV.
The only thing I can see that would give the landlord cause to keep the deposit if there was a lease in place and the term of the lease was not upheld. The tenant is responsible for the remainder of the term until the unit is re-rented for the remainder of the term. Breaking the lease prior to the expiration of the term invokes this clause. Since there was no lease signed, the tenancy is considered month to month.
I assume that a move out inspection was conducted with the landlord and the landlord provided a clean report. Otherwise that would be the only area your friend is vulnerable. Technically (and if the landlord is unscrupulous) he could generate a report indication repairs that were needed that cant be shown in pictures or a video.
There are good and bad landlords out there. I personally am never offended when tenants ask for written correspondences from me. In fact I prefer to keep all communications between myself and my tenants in writing so that there is no misunderstanding.
Reply:10 Points LOL big dealllllll The question is how long she agreed to stay in the unit. and where it is located.
If she is college student in a College town, timing is a big deal
ALL my leases state plain and clear. "Moving out early forfeits any and all deposits, and prepaid rents".
I think that is pretty well standard in most leases..
She made an agreement, so she is in the wrong, Only thing in her favor is she can dispute the length of the lease agreed to... and fact she has no lease is something else, but if she signed application, might have some of the terms in it.
I have a young man now that is trying to move out after nine months because he is going to be gone this summer, and does not want to pay rent... But his lease says he has to pay, and even my web site says same thing... He will not get his deposit back, or any prepaid rent. Sometimes a landlord has to be a JERK, and this is one of them in my book, Else what good is a lease??
Reply:You're correct, she doesn't "forfeit" the deposit just because she was there less six months. I'm a landlord myself and I've never heard of that "law."
This assumes she doesn't have a lease. If she doesn't, she in effect has a month-to-month lease and can move out at any time, simply by giving a 30-day notice.
Note that in many states, her landlord actually owes her interest on her deposit too. Remember, it's her money... it's just a "deposit." Technically, many states can force a landlord to not only return the deposit, but the appropriate amount of interest as well. (It will be a very small amount, I'm sure. I wouldn't worry about this.)
An landlord can withhold a fair amount of the deposit for cleaning, to repair broken items, things like that. It sounds as if the judge will decide what is a fair amount. Her having pictures of the place after she left it, will help her. I don't know if the judge is going to want to look at a video. (Maybe.) So yes, definitely take the pictures to court.
How did she pay her landlord for this deposit? With a check? If so, can she prove it and can she prove how much she paid? Did the landlord give her a receipt? Have her bring all of these types of receipts too.
I can't believe she didn't sign any kind of a lease, though.
Reply:Have her check with the clerk or the judge's secretary regarding the admissability of the pictures and video. She should definitely bring them unless she is specifically told by the court or judge not to. I would have the pictures printed out and have 2 or 3 copies on disk (1 for landlord, 1 for court/judge). Same with the video.
Help! I'm going to Small Claims Court Next Month Need Pointers...PLEASE!!?
Well technically I'm not going, but my friend is...She's taking her ex land lord to court b/c he refuses to give her back her deposit. She left the apartment in good condition even took several pictures and video of how the apartment was left before and after she moved out. Anyway, she never signed a contract just filled out and application. She even gave her landlord a 30 day moving notice...However, her landlord refuses to give her back her deposit b/c she was only living in the apartment less than 6 months so "supposedly" she forfeits the deposit?! I've never herd of this rule b4. That's why she's taking him to small claims next month... So do you think she has a chance of getting her money back?!? Should she take the pics to court? How about the video? Should she take it on a disk or show him from her camera? Your feed back is greatly appreciated....Thanks in advance...Best answers gets 10 points for sure!!! ;]
Help! I'm going to Small Claims Court Next Month Need Pointers...PLEASE!!?
i would take both the video and pix..you can never be too sure....if there was nothing in writing about forfeiting the sec. dep. then there should be no prob getting it back
Reply:If she signed a 1yr. lease than she is lucky the landlord isn't trying to collect the remaining 6 mo. rent, which is legally due him. I wouldn't stir up that pot if I were your friend, I would let the man have the deposit and move on. Just be careful next time.
kudzu
Help! I'm going to Small Claims Court Next Month Need Pointers...PLEASE!!?
i would take both the video and pix..you can never be too sure....if there was nothing in writing about forfeiting the sec. dep. then there should be no prob getting it back
Reply:If she signed a 1yr. lease than she is lucky the landlord isn't trying to collect the remaining 6 mo. rent, which is legally due him. I wouldn't stir up that pot if I were your friend, I would let the man have the deposit and move on. Just be careful next time.
kudzu
Rate my FF Team? Scale of 1-10, give tips, pointers, etc. ( I had 1st pick in draft)?
QB-C.Palmer
RB-L.Johnson
RB/WR-W.McGahee
WR-C.Johnson
WR-L.Fitzgerald
TE-T.Gonzalez
D/ST-Panthers
K-S.Graham
BENCH-
QB-J.Delhomme
RB-W.Parker
WR-R.Wayne
TE-H.Miller
D/ST-Colts
K-M.Vanderjagt
QB-B.Roethlisberger
Rate my FF Team? Scale of 1-10, give tips, pointers, etc. ( I had 1st pick in draft)?
Alright,
Lets start from the bottom up:
Defense- I don't like the colts defense this year although many people do... I would trade them for a sleeper. (eagles D are primed for a huge comeback) As for the Panthers, I like them more than the Bears this year...
Kicker- Vanderjagt is having problems in training camp, not that many people know about it, so you should trade him and someone (like Wayne) for a top starter... Remember, Neil Rackers came off of the FA wire last year.
TE- I really like heath miller as your backup on account of the fact Big Ben won't have Bettis to run 9 TD's on 10 carries anymore. To tell you the truth for Gonzalez, I had him on my team last year and this year, but he was and will be a bust... for his calibour player. Heap will have a monster year so try trading gonzo for him.
WR- Johnson is a really good pickup along with Fitzgerald but I have a problem with taking anyone on those top-tier offenses. (i.e. Colts and Cards) Larry Fitz. has Boldin, Pope (high drafted TE) and of course James. I think Fitzgerald will get alot of yards again but see his TD # cut a lot. Same with Wayne. I'm trying to trade him right now... There will be more touchdowns to go around on the passing side of the football without James now, but with Harrison, Wayne, Clark, and HUGE sleeper Stokley (Peyton wants to "bring back Stokley's 10 TD year.") I think the only sure fire bet would be harrison.
RB- Trade Willie Parker. Period. He's way too risky in a "run by committee" offense. You should get a good deal with him and Wayne for a sleeper WR and a top RB. see how that works out. Larry Johnson lost Roaf but will remain in the top 3. I've seen alot of skeptics for McGahee although I think he should be a solid backup.
QB: Your taking a slight risk with this injury affected group of QB's... Palmer should be back to old form, although his numbers from last year were unhuman. Big Ben seems to have not been affected that much from his accident. Surpringly, I have to say Delhomme is the most injury AFFECTED QB on your team. Why? Because his top receiver, most of the team's offense for that matter, has an injury that really hurts a players explosiveness. If Brunell is still on the waiver wire, I really like him as a backup due to his receiver core, Cooley as the H-Back, and Portis keeping defenses off guard.
I'd say you have a pretty good team with a kink or two at running back and TE.
Reply:Great Team... For a four team league you have like 2 1st round draft picks. But a good team.
Reply:Your team looks great. There is no way in hell there was 10 people in this league. You had to been in a 6 or 8 man league. Anyway you have 3 really good RB (LJ being the best in the league this year) WR's are out of this world Johnson and Fitzgerald good lord man. QB is great if he can play the first few weeks and if he can't Delhomme is a great backup, a lot of people are starting him this year. Gonzalez is always solid even though his performance has dipped in recent years, and he could be asked to drop back and block more like last year now that Willie Roaf has retired. DEF is great and who cares about Kickers. All and All I would say your team is a
10 man league- 10
8 man league- 10
6 man leauge- 9.6
Reply:9. you should have drafted a 4th receiver instead of a 3rd qb
Reply:very good. Big Ben should be good this year. I have my doubts about LJ though. He lost Roaf.
Reply:10 I don't know how you could have done any better.
Reply:looks good, where there only four people in the draft?
Reply:10
Reply:thats why cause there is only 6 teams! Thats not fair!
Reply:I'll give you a 9.5. I see your weakness being at RB. That being said its only because your other positions are so strong.
Questions are going to be -
Will Palmer be effective after the surgery?
Will Larry Johnson be Ok with his weaker offensive line?
Will Willie Parker be as effective as last year?
Man you are going to be fine with this team unless somebody else has Peyton Manning, Steve Smith, Shaun Alexander, Tiki Barber.
RB-L.Johnson
RB/WR-W.McGahee
WR-C.Johnson
WR-L.Fitzgerald
TE-T.Gonzalez
D/ST-Panthers
K-S.Graham
BENCH-
QB-J.Delhomme
RB-W.Parker
WR-R.Wayne
TE-H.Miller
D/ST-Colts
K-M.Vanderjagt
QB-B.Roethlisberger
Rate my FF Team? Scale of 1-10, give tips, pointers, etc. ( I had 1st pick in draft)?
Alright,
Lets start from the bottom up:
Defense- I don't like the colts defense this year although many people do... I would trade them for a sleeper. (eagles D are primed for a huge comeback) As for the Panthers, I like them more than the Bears this year...
Kicker- Vanderjagt is having problems in training camp, not that many people know about it, so you should trade him and someone (like Wayne) for a top starter... Remember, Neil Rackers came off of the FA wire last year.
TE- I really like heath miller as your backup on account of the fact Big Ben won't have Bettis to run 9 TD's on 10 carries anymore. To tell you the truth for Gonzalez, I had him on my team last year and this year, but he was and will be a bust... for his calibour player. Heap will have a monster year so try trading gonzo for him.
WR- Johnson is a really good pickup along with Fitzgerald but I have a problem with taking anyone on those top-tier offenses. (i.e. Colts and Cards) Larry Fitz. has Boldin, Pope (high drafted TE) and of course James. I think Fitzgerald will get alot of yards again but see his TD # cut a lot. Same with Wayne. I'm trying to trade him right now... There will be more touchdowns to go around on the passing side of the football without James now, but with Harrison, Wayne, Clark, and HUGE sleeper Stokley (Peyton wants to "bring back Stokley's 10 TD year.") I think the only sure fire bet would be harrison.
RB- Trade Willie Parker. Period. He's way too risky in a "run by committee" offense. You should get a good deal with him and Wayne for a sleeper WR and a top RB. see how that works out. Larry Johnson lost Roaf but will remain in the top 3. I've seen alot of skeptics for McGahee although I think he should be a solid backup.
QB: Your taking a slight risk with this injury affected group of QB's... Palmer should be back to old form, although his numbers from last year were unhuman. Big Ben seems to have not been affected that much from his accident. Surpringly, I have to say Delhomme is the most injury AFFECTED QB on your team. Why? Because his top receiver, most of the team's offense for that matter, has an injury that really hurts a players explosiveness. If Brunell is still on the waiver wire, I really like him as a backup due to his receiver core, Cooley as the H-Back, and Portis keeping defenses off guard.
I'd say you have a pretty good team with a kink or two at running back and TE.
Reply:Great Team... For a four team league you have like 2 1st round draft picks. But a good team.
Reply:Your team looks great. There is no way in hell there was 10 people in this league. You had to been in a 6 or 8 man league. Anyway you have 3 really good RB (LJ being the best in the league this year) WR's are out of this world Johnson and Fitzgerald good lord man. QB is great if he can play the first few weeks and if he can't Delhomme is a great backup, a lot of people are starting him this year. Gonzalez is always solid even though his performance has dipped in recent years, and he could be asked to drop back and block more like last year now that Willie Roaf has retired. DEF is great and who cares about Kickers. All and All I would say your team is a
10 man league- 10
8 man league- 10
6 man leauge- 9.6
Reply:9. you should have drafted a 4th receiver instead of a 3rd qb
Reply:very good. Big Ben should be good this year. I have my doubts about LJ though. He lost Roaf.
Reply:10 I don't know how you could have done any better.
Reply:looks good, where there only four people in the draft?
Reply:10
Reply:thats why cause there is only 6 teams! Thats not fair!
Reply:I'll give you a 9.5. I see your weakness being at RB. That being said its only because your other positions are so strong.
Questions are going to be -
Will Palmer be effective after the surgery?
Will Larry Johnson be Ok with his weaker offensive line?
Will Willie Parker be as effective as last year?
Man you are going to be fine with this team unless somebody else has Peyton Manning, Steve Smith, Shaun Alexander, Tiki Barber.
Who needs some itunes and ipod pointers?
People seem to ask some of the same questions a lot and a lot of people seem very ignorant of their music player so here are some hints
Itunes default is aac. Change this if you plan to use that music with anything other than your ipod. Do this before you import any cds onto your computer. go under edit/preferences/advanced/import change the default from aac to mp3. Now you can use your music for any other program out there, including media player.
If your music is already aac then change the default to mp3 and then you can convert your unprotected aac music to mp3 by highlighting the songs clicking advanced/convert to mp3.
Your actual music is NOT in itunes. It is on your computer. Most of the time it is under the C drive on mydocuments/mymusic/itunes. The only way you can delete music from itunes off your computer is if the music is in your default itunes folder and you send the music to the recycle bin. Otherwise you are just removing the music from the music player.,
Who needs some itunes and ipod pointers?
hey can u re-answer mah Question on how do i use mah ITunes?
I synced mah Ipod to the Comp and i have chosen mah songs but HOW do i download them onto the ACTUAL thing lol.
Itunes default is aac. Change this if you plan to use that music with anything other than your ipod. Do this before you import any cds onto your computer. go under edit/preferences/advanced/import change the default from aac to mp3. Now you can use your music for any other program out there, including media player.
If your music is already aac then change the default to mp3 and then you can convert your unprotected aac music to mp3 by highlighting the songs clicking advanced/convert to mp3.
Your actual music is NOT in itunes. It is on your computer. Most of the time it is under the C drive on mydocuments/mymusic/itunes. The only way you can delete music from itunes off your computer is if the music is in your default itunes folder and you send the music to the recycle bin. Otherwise you are just removing the music from the music player.,
Who needs some itunes and ipod pointers?
hey can u re-answer mah Question on how do i use mah ITunes?
I synced mah Ipod to the Comp and i have chosen mah songs but HOW do i download them onto the ACTUAL thing lol.
Rate my fantasy baseball team. any pointers, tips, advice?
C: Victor Martinez
1B: Ryan Howard
2B: Dan Uggla
3B: Scott Rolen
SS: Miguel Tejada
OF's: Ichiro, Mike Cameron, Andruw Jones
Util's: Richie Sexton, Chipper Jones
SP;s: Barry Zito, Dan Haren, Jason Shmidt, Jon Garland
RP's: Armando Benitez, Mike Gonzalez, Scott Shields
BN's: Kevin Millwood, Omar Vizquel, Jim Edmonds, Hank Blalock, Shea Hillenbrand.
Anything I should look to improve on?
Rate my fantasy baseball team. any pointers, tips, advice?
It looks like a good offense.
Sexton a-lot of homers but a very bad avg. Probably could pick up a guy off the wavier wires that puts up a better avg but a little less on homers(a more well rounded player could be used)
Starting Pitching looks good but you wont lead in ERA or K's but will be middle of the pack or just above.
On to Relief Pitchers Where you Really Lack!!!
Armando Benitez when healthy can be good(but remember the key words here "WHEN HEALTHY") keep a eye on him
Mike Gonzalez is not a closer(Bob Wickman is the Closer)
Im assuming you ment Scot-Shields LAA Rp If so he is not a closer as well (K-Rod is the Closer for the Angels)
Check the waviers and see if a guy like Jose Valerde(dont know is spelling is right) Rp for Arizona is available he's there closer everyone seems to over look cause of his era.
If not id say make a trade to get a closer
Its a good starting point with a little work to do but not a bad team.
Reply:Very solid team that is well balanced. Nice work on depth at 3rd base. Rolen is coming off an injury and Chip is hurt all of the time. Mike Gonzalez should eventually take closing duties from Wickman. The guy didn't blow a single save last year. Barry Zito is a big name but he will probably be playing for a last place team so try to make a trade for another pitcher that gets more run support and pitches for a winning team.
Reply:looks like a well drafted team.....you could possible grab one more starting pitcher like a clay hensley or wainwright and you will be all set
Reply:1 B : Albert Pujols
SS: David Eckstein
Reply:nice team upgrade your starting pitchers my fantasy draft is tomorrow morning cant wait but anyway its a great team
1B: Ryan Howard
2B: Dan Uggla
3B: Scott Rolen
SS: Miguel Tejada
OF's: Ichiro, Mike Cameron, Andruw Jones
Util's: Richie Sexton, Chipper Jones
SP;s: Barry Zito, Dan Haren, Jason Shmidt, Jon Garland
RP's: Armando Benitez, Mike Gonzalez, Scott Shields
BN's: Kevin Millwood, Omar Vizquel, Jim Edmonds, Hank Blalock, Shea Hillenbrand.
Anything I should look to improve on?
Rate my fantasy baseball team. any pointers, tips, advice?
It looks like a good offense.
Sexton a-lot of homers but a very bad avg. Probably could pick up a guy off the wavier wires that puts up a better avg but a little less on homers(a more well rounded player could be used)
Starting Pitching looks good but you wont lead in ERA or K's but will be middle of the pack or just above.
On to Relief Pitchers Where you Really Lack!!!
Armando Benitez when healthy can be good(but remember the key words here "WHEN HEALTHY") keep a eye on him
Mike Gonzalez is not a closer(Bob Wickman is the Closer)
Im assuming you ment Scot-Shields LAA Rp If so he is not a closer as well (K-Rod is the Closer for the Angels)
Check the waviers and see if a guy like Jose Valerde(dont know is spelling is right) Rp for Arizona is available he's there closer everyone seems to over look cause of his era.
If not id say make a trade to get a closer
Its a good starting point with a little work to do but not a bad team.
Reply:Very solid team that is well balanced. Nice work on depth at 3rd base. Rolen is coming off an injury and Chip is hurt all of the time. Mike Gonzalez should eventually take closing duties from Wickman. The guy didn't blow a single save last year. Barry Zito is a big name but he will probably be playing for a last place team so try to make a trade for another pitcher that gets more run support and pitches for a winning team.
Reply:looks like a well drafted team.....you could possible grab one more starting pitcher like a clay hensley or wainwright and you will be all set
Reply:1 B : Albert Pujols
SS: David Eckstein
Reply:nice team upgrade your starting pitchers my fantasy draft is tomorrow morning cant wait but anyway its a great team
Rate My Team on a 1-10 scale and tips/pointers?
its a 10 person league, head to head. also tell of some trades i should make, any good players to hold onto, wholl be valuable and who i should get rid of... ill also say the good Free Agents after i list my team. my team goes as follows:
C- Kenji Johjima
1B- Prince Fielder
2B- Howie Kendrick
3B- Edwin Encarnacion
SS- Jose Reyes
OF- Matt Holliday
OF- Jason Bay
OF- Rocco Baldelli
UTIL- Travis Hafner
UTIL- Rafael Furcal
Bench- Brad Hawpe
SP- C.C. Sabathia
SP- Chris Young (SD-P)
SP- Rich Hill
SP- John Patterson
SP- Scott Olsen
SP- AJ Burnett
SP- Clay Hensley
SP/RP- Adam Wainwright
RP- Mariano Rivera
RP- Brian Fuentes
RP- Eric Gagne
RP- Jason Isringhausen
Free Agents:
Bobby Crosby (Oak-SS)
Austin Kearns
Jorge Cantu
Ken Griffey Jr
Chris Duffy
Conor Jackson
Jonny Gomes
Chris B. Young
Luke Scott
Joel Zumaya
Jeremy Sowers
Tim Hudson
Chuck James
Pat Neshek
John Maine
Homer Bailey
Matt Miller (Cle-P)
Derrick Turnbow
Anthony Reyes
Chad Billingsley
Adam Loewen
Oliver Perez
THANKS ALOT GUYS!!!
Rate My Team on a 1-10 scale and tips/pointers?
lets go player by player
c-johjima is a top 5 catcher in baseball
1b-prince could hit close to 30 homers and 100 rbis or sophmore slump could hit him hard and he could really do bad
2b-howie kendrick is on tab to really produce this year for the angels.....
3b- encarnacion is a cheap 30 homer threat but comits alot of errors decent value
ss- reyes is best in game good for 60-70 steals this year really produces in mets lineup will score alot of runs this year
of- holliday is a GREAT pick good for 30+/110+/.300+ with alot of upside for those numbers to even improve...
of- jason bay is a great young of with alot of potential and always good for about 30 homers and 100 rbis and good average
of- rocco is injury prone i wouldnt trust him but if healthy good basestealin threat and can hit for power and average as well
util- hafner is a beast plain and simple lol
UTIL- Rafael Furcal- is a true basestealer who cna hit for average and decent power at his position good for 30sb or so
Bench- Brad Hawpe- good young player good for 20homers 90 rbis and such with a decent average
SP- C.C. Sabathia- dont know bout his injury right now but if healthy on tap for 18 wins with revamped bullpen of cleveland indians.
SP- Chris Young is a good young talent but im just not tottaly sold on him but has electric stuff could be darkhorse for nl cy young
SP- Rich Hill should not be your third starter isnt as established as first two but wil do just fine in chicago
SP- John Patterson- when healthy can k 200 ...was announced the ace of the staff in washingotn if healthy also good for 16 wins or so
SP- Scott Olsen- olsen is a good young talent that has a good arm and can be an innings eater
SP- AJ Burnett- if healthy and regained to old form can dominate hitters at time good for 200k as well
SP- Clay Hensley- GREAT pick ...will surpirse alot of people with a breakout year of about 14 wins and 170 k
SP/RP- Adam Wainwright- another GREAT sleeper pick has an era of under one this spring and i expect his stuff to stay the same throughout the year
RP- Mariano Rivera- is the best nuff said lol good for 40 saves and an era around 1
RP- Brian Fuentes- good closer is proven and he will grab ya 30 or so saves
RP- Eric Gagne- if healthy could come back to dominating like the old days and early indications are he is doin just fine but wont pitch back to back days right away expect 25-35 saves this year
RP- Jason Isringhausen- is old and broken lol no if healthy good for under 30 saves
Free Agents:
Bobby Crosby- i would say no to picking him seeing as he is injury prone and offense is not scary in oakland
Austin Kearns- no to him as well hitting out in cavernous rfk wont put up kearns like numbers that his potential has shown
Jorge Cantu- yes only if he can regain his all star form pre injury when he could swing a mean bat and field really well...i expect him to bounce back and produce well again with 20+hr/90rbis/.290
Ken Griffey Jr- injury prone as well but still good for 20 homers or so possibly 30 if he can stay healthy long enough
Chris Duffy- great basestealer but thats about all he can do expect him to be a scott podsednik type player with an awful average and gaudy sb numbers
Conor Jackson- is projected to really breakout this year in zona
Jonny Gomes- i expect a big year out of him god for 25+ homers and 100 rbis but average hanging around .260 but if healthy will produce for sure
Chris B. Young- isnt goign to produce right away but i expect a decent rookie year out of him
Luke Scott- could quite possibly start if lane continues his spiral downward
Joel Zumaya-YES TO HIM he will eventually be closing in detroit and can dial it up
Jeremy Sowers- GREAT sleeper who will reallystep up in clevleand this year good for 12-16 wins this year
Tim Hudson- has never panned out in the nl so i would say no
Chuck James- GREAT sleeper who has an era under 1 this spring and will produce those same numbers during the season good for 15 wins or so
Pat Neshek- is a releiver who wont get you alot of innings so no
John Maine- no to him as well because he isnt really dominant fantasy stat type pitcher
Homer Bailey- wont even play much thsi year to start could be a call up halfway through
Matt Miller- to be honest witih you i dont even really know about him
Derrick Turnbow- has turned it back up this year and could quite possibly close if cordero chokes
Anthony Reyes- has been lightsout of lat ein spring as well
Chad Billingsley- id say no to him seeing as he wont be starting either
Adam Loewen- good young talent in baltimore but hasnt harnessed his stuff fully last year although he did shutout the yanks twice last year
Oliver Perez- NO NO NO era will sky rocket and he was a basically one hit wonder due to major surgery
so i would say overall your team could use one more basestealer such as duffy, taveras, or dave roberts...a couple of sleeper hitters that are most likely on the wire who you could look at are adrian gonzalez, ty wigginton, or chris duncan as well...but overall i would say your team has a great mix of power and average throughout the entire lineup
as for your staff i would say that you have maybe one really proven pitcher in cc but your rp are excellent....you could look at a couple of pitchers like chuck james, or a jeremy sowers and id say keep an eye on todd jones and if he starts to faulter as closer grab zumaya right away
hope i helped
goodluck and have fun!!!
Reply:You should drop hensley for reyes, and you need more hitters. Maybe try and package furcal and isringhausen for a better 3rd baseman.
Reply:H2H - If WHIP and K's And ERA factor in Pick up Zumaya even though he is middle relief his K's and low era/whip add value to your staff as a whole.
Offensively you look fine. If Adrian Gonzales (1B SD) is available I'd pick him up too.
I give you a SOLID 7.6
Reply:Very Good Batting Order, too many pitchers considering it's a head-to-head league, your biggest weak link is Encarnacion and Kendrick, Kendrick has a possibility of going for 20 HR and 20 SB so you should try and concentrate on trading your pitchers on a much better 3B and if possible Kendrick but the 2B market is weak right now so i'm not sure anyone is willing to give up their 2B, i'll rate it an 8.5
Reply:Drop Hensley for Zumaya and try to upgrade third. In a ten person league you should have a better batting line-up-you seem to have stocked releivers, try trading one or two of them for some better hitting.
Reply:good i guess
Reply:Your team is great dude! You got guys with severe talent, that bust their a$$e$ everyday, and have room for potential and growth (as if they didn't p0wn already). Holliday, Kendrick and Hawpe are as good as they get. Chris Young and Clay Hensley will be household names by next season. You heard it here first from the Fantasy Girly! ~N
garland flower
C- Kenji Johjima
1B- Prince Fielder
2B- Howie Kendrick
3B- Edwin Encarnacion
SS- Jose Reyes
OF- Matt Holliday
OF- Jason Bay
OF- Rocco Baldelli
UTIL- Travis Hafner
UTIL- Rafael Furcal
Bench- Brad Hawpe
SP- C.C. Sabathia
SP- Chris Young (SD-P)
SP- Rich Hill
SP- John Patterson
SP- Scott Olsen
SP- AJ Burnett
SP- Clay Hensley
SP/RP- Adam Wainwright
RP- Mariano Rivera
RP- Brian Fuentes
RP- Eric Gagne
RP- Jason Isringhausen
Free Agents:
Bobby Crosby (Oak-SS)
Austin Kearns
Jorge Cantu
Ken Griffey Jr
Chris Duffy
Conor Jackson
Jonny Gomes
Chris B. Young
Luke Scott
Joel Zumaya
Jeremy Sowers
Tim Hudson
Chuck James
Pat Neshek
John Maine
Homer Bailey
Matt Miller (Cle-P)
Derrick Turnbow
Anthony Reyes
Chad Billingsley
Adam Loewen
Oliver Perez
THANKS ALOT GUYS!!!
Rate My Team on a 1-10 scale and tips/pointers?
lets go player by player
c-johjima is a top 5 catcher in baseball
1b-prince could hit close to 30 homers and 100 rbis or sophmore slump could hit him hard and he could really do bad
2b-howie kendrick is on tab to really produce this year for the angels.....
3b- encarnacion is a cheap 30 homer threat but comits alot of errors decent value
ss- reyes is best in game good for 60-70 steals this year really produces in mets lineup will score alot of runs this year
of- holliday is a GREAT pick good for 30+/110+/.300+ with alot of upside for those numbers to even improve...
of- jason bay is a great young of with alot of potential and always good for about 30 homers and 100 rbis and good average
of- rocco is injury prone i wouldnt trust him but if healthy good basestealin threat and can hit for power and average as well
util- hafner is a beast plain and simple lol
UTIL- Rafael Furcal- is a true basestealer who cna hit for average and decent power at his position good for 30sb or so
Bench- Brad Hawpe- good young player good for 20homers 90 rbis and such with a decent average
SP- C.C. Sabathia- dont know bout his injury right now but if healthy on tap for 18 wins with revamped bullpen of cleveland indians.
SP- Chris Young is a good young talent but im just not tottaly sold on him but has electric stuff could be darkhorse for nl cy young
SP- Rich Hill should not be your third starter isnt as established as first two but wil do just fine in chicago
SP- John Patterson- when healthy can k 200 ...was announced the ace of the staff in washingotn if healthy also good for 16 wins or so
SP- Scott Olsen- olsen is a good young talent that has a good arm and can be an innings eater
SP- AJ Burnett- if healthy and regained to old form can dominate hitters at time good for 200k as well
SP- Clay Hensley- GREAT pick ...will surpirse alot of people with a breakout year of about 14 wins and 170 k
SP/RP- Adam Wainwright- another GREAT sleeper pick has an era of under one this spring and i expect his stuff to stay the same throughout the year
RP- Mariano Rivera- is the best nuff said lol good for 40 saves and an era around 1
RP- Brian Fuentes- good closer is proven and he will grab ya 30 or so saves
RP- Eric Gagne- if healthy could come back to dominating like the old days and early indications are he is doin just fine but wont pitch back to back days right away expect 25-35 saves this year
RP- Jason Isringhausen- is old and broken lol no if healthy good for under 30 saves
Free Agents:
Bobby Crosby- i would say no to picking him seeing as he is injury prone and offense is not scary in oakland
Austin Kearns- no to him as well hitting out in cavernous rfk wont put up kearns like numbers that his potential has shown
Jorge Cantu- yes only if he can regain his all star form pre injury when he could swing a mean bat and field really well...i expect him to bounce back and produce well again with 20+hr/90rbis/.290
Ken Griffey Jr- injury prone as well but still good for 20 homers or so possibly 30 if he can stay healthy long enough
Chris Duffy- great basestealer but thats about all he can do expect him to be a scott podsednik type player with an awful average and gaudy sb numbers
Conor Jackson- is projected to really breakout this year in zona
Jonny Gomes- i expect a big year out of him god for 25+ homers and 100 rbis but average hanging around .260 but if healthy will produce for sure
Chris B. Young- isnt goign to produce right away but i expect a decent rookie year out of him
Luke Scott- could quite possibly start if lane continues his spiral downward
Joel Zumaya-YES TO HIM he will eventually be closing in detroit and can dial it up
Jeremy Sowers- GREAT sleeper who will reallystep up in clevleand this year good for 12-16 wins this year
Tim Hudson- has never panned out in the nl so i would say no
Chuck James- GREAT sleeper who has an era under 1 this spring and will produce those same numbers during the season good for 15 wins or so
Pat Neshek- is a releiver who wont get you alot of innings so no
John Maine- no to him as well because he isnt really dominant fantasy stat type pitcher
Homer Bailey- wont even play much thsi year to start could be a call up halfway through
Matt Miller- to be honest witih you i dont even really know about him
Derrick Turnbow- has turned it back up this year and could quite possibly close if cordero chokes
Anthony Reyes- has been lightsout of lat ein spring as well
Chad Billingsley- id say no to him seeing as he wont be starting either
Adam Loewen- good young talent in baltimore but hasnt harnessed his stuff fully last year although he did shutout the yanks twice last year
Oliver Perez- NO NO NO era will sky rocket and he was a basically one hit wonder due to major surgery
so i would say overall your team could use one more basestealer such as duffy, taveras, or dave roberts...a couple of sleeper hitters that are most likely on the wire who you could look at are adrian gonzalez, ty wigginton, or chris duncan as well...but overall i would say your team has a great mix of power and average throughout the entire lineup
as for your staff i would say that you have maybe one really proven pitcher in cc but your rp are excellent....you could look at a couple of pitchers like chuck james, or a jeremy sowers and id say keep an eye on todd jones and if he starts to faulter as closer grab zumaya right away
hope i helped
goodluck and have fun!!!
Reply:You should drop hensley for reyes, and you need more hitters. Maybe try and package furcal and isringhausen for a better 3rd baseman.
Reply:H2H - If WHIP and K's And ERA factor in Pick up Zumaya even though he is middle relief his K's and low era/whip add value to your staff as a whole.
Offensively you look fine. If Adrian Gonzales (1B SD) is available I'd pick him up too.
I give you a SOLID 7.6
Reply:Very Good Batting Order, too many pitchers considering it's a head-to-head league, your biggest weak link is Encarnacion and Kendrick, Kendrick has a possibility of going for 20 HR and 20 SB so you should try and concentrate on trading your pitchers on a much better 3B and if possible Kendrick but the 2B market is weak right now so i'm not sure anyone is willing to give up their 2B, i'll rate it an 8.5
Reply:Drop Hensley for Zumaya and try to upgrade third. In a ten person league you should have a better batting line-up-you seem to have stocked releivers, try trading one or two of them for some better hitting.
Reply:good i guess
Reply:Your team is great dude! You got guys with severe talent, that bust their a$$e$ everyday, and have room for potential and growth (as if they didn't p0wn already). Holliday, Kendrick and Hawpe are as good as they get. Chris Young and Clay Hensley will be household names by next season. You heard it here first from the Fantasy Girly! ~N
garland flower
I need pointers on how to talk to a girl?
I'm a junior in high school and there is this girl i would like to get to know. this girl is in the same grade, but i just don't really know what to talk about. i don't really talk to a lot of girls that i like b/c there really isn't a lot of good looking girls at my school. the school that i go to has many differ. schools in it and there are a lot of people that doesn't know each other.
Girls advice will be very helpful and along with guys.
I need pointers on how to talk to a girl?
Do u know her if u do just go up to her and talk to her and look her in the eyes and smile when your talking. Ask her about wat she likes then "BAM!!" ask her out. If u don't know her just look at her a lot and smile when u see her. That is every girls dream, for a guy to treat her like that.
Reply:Roll up all smooth with your pimp limp, and squinty eyes, like you got dust in both of em. Keep direct eye contact while rolling up, when you get 5 feet away start saying holla holla lal alala. when you get a foot away Look her up and down and then give her the thumbs up. Ask her if her father was a meat burglar, then when she asks why leave without looking back. She will think about you all day.
Girls advice will be very helpful and along with guys.
I need pointers on how to talk to a girl?
Do u know her if u do just go up to her and talk to her and look her in the eyes and smile when your talking. Ask her about wat she likes then "BAM!!" ask her out. If u don't know her just look at her a lot and smile when u see her. That is every girls dream, for a guy to treat her like that.
Reply:Roll up all smooth with your pimp limp, and squinty eyes, like you got dust in both of em. Keep direct eye contact while rolling up, when you get 5 feet away start saying holla holla lal alala. when you get a foot away Look her up and down and then give her the thumbs up. Ask her if her father was a meat burglar, then when she asks why leave without looking back. She will think about you all day.
Rate My Baseball Fantasy Team and any pointers would be great?
C Víctor Martínez (Cle - C,1B)
1B Justin Morneau (Min - 1B)
2B Rickie Weeks (Mil - 2B)
3B Álex Rodríguez (NYY - 3B)
SS Derek Jeter (NYY - SS)
LF Alfonso Soriano (ChC - LF)
CF Johnny Damon (NYY - CF)
RF Vladimir Guerrero (LAA - RF)
Util Manny Ramírez (Bos - LF)
BN Rafael Furcal (LAD - SS)
BN Corey Patterson (Bal - CF)
BN Magglio Ordóñez (Det - RF)
BN Tadahito Iguchi (CWS - 2B)
BN Howie Kendrick (LAA - 1B,2B)
SP Carlos Zambrano (ChC - SP)
SP C.C. Sabathia (Cle - SP)
SP Scott Kazmir (TB - SP)
SP Randy Johnson (Ari - SP)
RP Mariano Rivera (NYY - RP)
RP Huston Street (Oak - RP)
RP José Valverde (Ari - RP)
P Eric Gagne (Tex - RP)
P Curt Schilling (Bos - SP)
P Bronson Arroyo (Cin - SP)
Rate My Baseball Fantasy Team and any pointers would be great?
Wow.. thats a great team for a big league.. TIPS - improve on your Relievers just a bit, Valverde sucks, and Street isnt amazing, and Gagne is injured.. I would try to trade Gooch or Kendrick and Johnson for a better reliever. Also, I would definitely try to trade your benched batters for pitchers, its always better to have more pitchers than batters because batters play every day, but pitchers pitch every 5 days. If you want a backup, thats fine, but your batters aren't really injury prone, your pitchers are.
Reply:You are either in an eight team fantasy league, or the other people have no clue what they are doing.
If you are in a 12 man league, you'll run away with all the offensive stats. Pitching is not quite so strong, but still solid.
Agree with the first post. You don't need so many players on the offensive bench. I usually just keep one offensive player on the bench. Trade some of your offense to shore up your pitching.
Reply:6 man league.... wow... i would bet you that like ryan howards on FA
Reply:This is a joke right? Or a 2 team league...
Reply:Rate:9.3/10
1B Justin Morneau (Min - 1B)
2B Rickie Weeks (Mil - 2B)
3B Álex Rodríguez (NYY - 3B)
SS Derek Jeter (NYY - SS)
LF Alfonso Soriano (ChC - LF)
CF Johnny Damon (NYY - CF)
RF Vladimir Guerrero (LAA - RF)
Util Manny Ramírez (Bos - LF)
BN Rafael Furcal (LAD - SS)
BN Corey Patterson (Bal - CF)
BN Magglio Ordóñez (Det - RF)
BN Tadahito Iguchi (CWS - 2B)
BN Howie Kendrick (LAA - 1B,2B)
SP Carlos Zambrano (ChC - SP)
SP C.C. Sabathia (Cle - SP)
SP Scott Kazmir (TB - SP)
SP Randy Johnson (Ari - SP)
RP Mariano Rivera (NYY - RP)
RP Huston Street (Oak - RP)
RP José Valverde (Ari - RP)
P Eric Gagne (Tex - RP)
P Curt Schilling (Bos - SP)
P Bronson Arroyo (Cin - SP)
Rate My Baseball Fantasy Team and any pointers would be great?
Wow.. thats a great team for a big league.. TIPS - improve on your Relievers just a bit, Valverde sucks, and Street isnt amazing, and Gagne is injured.. I would try to trade Gooch or Kendrick and Johnson for a better reliever. Also, I would definitely try to trade your benched batters for pitchers, its always better to have more pitchers than batters because batters play every day, but pitchers pitch every 5 days. If you want a backup, thats fine, but your batters aren't really injury prone, your pitchers are.
Reply:You are either in an eight team fantasy league, or the other people have no clue what they are doing.
If you are in a 12 man league, you'll run away with all the offensive stats. Pitching is not quite so strong, but still solid.
Agree with the first post. You don't need so many players on the offensive bench. I usually just keep one offensive player on the bench. Trade some of your offense to shore up your pitching.
Reply:6 man league.... wow... i would bet you that like ryan howards on FA
Reply:This is a joke right? Or a 2 team league...
Reply:Rate:9.3/10
Subscribe to:
Posts (Atom)