CoolGamer48 65 Posting Pro in Training

On a laptop running Windows XP, I can't seem to view webpages or actually connect to any server. Going to pages in IE or firefox give me unable to connect/cannot display errors. Trying to ftp to a server through windows explorer or filezilla gives me simmilar errors. Everything I do seems to indicate that I'm not connected to the internet... except the fact that I can ping other sites (google.com, yahoo.com, etc...) and the pings come back fine. When I disconnect the ethernet cable from the computer and try pining, it doesn't work. Does anyone know why none of these programs can connect to the internet, but my pings are going through?

CoolGamer48 65 Posting Pro in Training

Ahh.... I figured it out. Somewhere in the methods of my class I was catching the exception that would normally be thrown as an std::exception and re-throwing it (not really sure why I had done that...). Once I removed that the exceptions work as expected.

CoolGamer48 65 Posting Pro in Training

hmm.... well, i defined a function:

void func()
{
	throw Surface::image_load_failed("my error");
}

and called that from my try block, which resulted in the output I would have expected originally. I'll look more into the possibility that it is some other exception.

edit:
well, changing the body of Surface::loadImage() to throw image_load_failed("lol error"); didn't fix my original problem. that's odd... it seems to have something to do with the class....

CoolGamer48 65 Posting Pro in Training

I have a child of std::exception defined as:

struct image_load_failed : public std::exception
	{
		image_load_failed(std::string const s) : message(s) {}
		virtual ~image_load_failed() throw() {}
		
		const char* what() const throw()
		{
			return "image load failed";//message.c_str();
		}
		
		std::string const message;
	};

(I would normally have what() return message.c_str(), but I've done it like this for debugging reasons).

It's thrown here:

throw image_load_failed(IMG_GetError());

and an atempt to catch it:

try
	{
		circle.loadImage("circle.bmp", Color(255,255,255));
	}
	catch(Surface::image_load_failed const& e)
	{
		std::cout << e.what() << std::endl;
		throw e;
	}
	catch(std::exception const& e)
	{
		std::cout << e.what() << std::endl;
		throw e;
	}

this section of the code prints "std::exception". the exception that is then still being thrown causes the program to exit with:

terminate called after throwing an instance of 'std::exception'
  what():  std::exception

adding throw(Surface::image_load_failed) to the functions doesn't help. Anyone know why my classes are being interpreted as std::exceptions, and not the child classes I've created? (or more importantly, why the message is being lost)

CoolGamer48 65 Posting Pro in Training

alright, so apparently eclipse uses the project's root folder as the working directory by default, so I made the path local to that and it worked. Many thanks.

Oh, and I'm making Pong.

edit:
hmm, well actually my original method still doesn't work.... I'll used the other method for now, but any other ideas why the first one doesn't work?

CoolGamer48 65 Posting Pro in Training

Hmm... apparently Java isn't recognizing the file. But the file is in the same directory as the .java file.

$ ls ~/workspace/Pong/src/
Ball.java  KeyboardListener.java  Main.java  Paddle.java  Sprite.java  paddle.bmp

and the message printed by

if(!(new File(filename)).exists())
		{
			System.out.println(filename+" doesn't exist");
		}

was "paddle.bmp doesn't exist"

Is putting the file in the .java file's directory not sufficient? Does it have to be in a PATH directory?

CoolGamer48 65 Posting Pro in Training

Sorry about the lines, here's the original file:

import java.awt.*;

public abstract class Sprite
{
	private Image m_image;
	private Point m_position;
	
	public Sprite(int x, int y)
	{
		m_position = new Point(x, y);
	}
	
	public void SetImage(String filename)
	{
		System.out.println("Point A");
		System.out.println("Point B");
		m_image = Toolkit.getDefaultToolkit().getImage(getClass().getResource(filename));
		System.out.println("Point C");
		MediaTracker mt = new MediaTracker(null);
		System.out.println("Point D");
		mt.addImage(m_image, 0);
		System.out.println("Point E");
		try
		{
			System.out.println("Point F");
			mt.waitForID(0);
			System.out.println("Point G");
		}
		catch (InterruptedException ie)
		{
			System.err.println(ie);
			System.exit(1);
		}
		System.out.println("Point H");
	}
	
	
	public void GetInput(KeyboardListener kb)
	{
	}
	
	public void Update()
	{
	}
	
	public void Draw(Graphics2D g)
	{
		g.drawImage(m_image, m_position.x, m_position.y, null);
	}
	
	public Point GetPosition()
	{
		return m_position;
	}
	
	public int GetX()
	{
		return m_position.x;
	}
	
	public int GetY()
	{
		return m_position.y;
	}
	
	public void SetPosition(Point p)
	{
		m_position = p;
	}
	
	public void SetX(int x)
	{
		m_position.x = x;
	}
	
	public void SetY(int y)
	{
		m_position.y = y;
	}
}

line 45 is just the call to this method from another file.

The code gets to point F

I'm loading a bitmap.

I tried the method you suggested and I get this exception:
javax.imageio.IIOException: Can't read input file!

Here's the code:

try
		{
			System.out.println("Point A");
			m_image = ImageIO.read(new File(filename));
			System.out.println("Point B");
		}
		catch(IOException e)
		{
			System.out.println("Point C");
			System.err.println(e);
			System.out.println("Point D");
			System.exit(1);
		}

I also changed m_image from an object of Image to BufferedImage

CoolGamer48 65 Posting Pro in Training

I'm trying to load a bitmap into an Image object using the following code:

System.out.println("Point A");
		System.out.println("Point B");
		m_image = Toolkit.getDefaultToolkit().getImage(getClass().getResource(filename));
		System.out.println("Point C");
		MediaTracker mt = new MediaTracker(null);
		System.out.println("Point D");
		mt.addImage(m_image, 0);
		System.out.println("Point E");
		try
		{
			System.out.println("Point F");
			mt.waitForID(0);
			System.out.println("Point G");
		}
		catch (InterruptedException ie)
		{
			System.err.println(ie);
			System.exit(1);
		}
		System.out.println("Point H");

m_image is a private java.awt.Image object of the class I'm in and filename is a String argument of the method I'm in. The filename I pass to this method when I call it is the name of a bitmap in the same directory of the .java file. If it matters, I'm using eclipse to run this.

The code gets to point F, and gives me a NullPointerException (or so I think that's the issue, based on my knowledge of Java error output):

Exception in thread "main" java.lang.NullPointerException
	at java.awt.ImageMediaEntry.getStatus(MediaTracker.java:908)
	at java.awt.MediaTracker.statusID(MediaTracker.java:705)
	at java.awt.MediaTracker.waitForID(MediaTracker.java:653)
	at java.awt.MediaTracker.waitForID(MediaTracker.java:622)
	at Sprite.SetImage(Sprite.java:26)
	at Main.main(Main.java:45)

Any help getting the above code to work (or suggesting a alternate method of loading images) is appreciated.

CoolGamer48 65 Posting Pro in Training

Does anyone actually use the .hpp file extension for C++ header files? I've never seen it used, but I was just working with geany, and I noticed that it only syntax highlights C++ specific things if the file extension is .hpp (or .cpp, obviously, but not .h).

So what's the deal with that?

CoolGamer48 65 Posting Pro in Training

Anyone? This is issue is really bugging me... (no pun intended)

CoolGamer48 65 Posting Pro in Training

The folder is indexed but not archived.

Yes, I took control of the folder's children when I did the change of ownership (though I was already listed as the owner).

Oh, and it may be worth mentioning that not all files in the QT folder have this problem (not properly be included by the preprocessor). Only the my_version\include\QtXml files seem to be the problem.

CoolGamer48 65 Posting Pro in Training

Hey,

I just recently ran into a problem compiling a C++ project (no, I didnt mean to put this in the C++ forum). I got an error saying that a certain header file couldn't be opened (I had compiled with the same file before). I looked up the error and found that if a .h is read only this error will come up. I then find that the entire directory for the api (its qt btw) is read only (the box is filled, not checked). I remove the read only attribute, but when I check the properties again, its read only once again (UAC is disabled). I have found countless accounts of this on the internet, but none of the fixes worked for me (I tried changing the owner to my own user, disabling UAC, as i mentioned, and using the command line to change the attribute.)

Any ideas?

A possibly relevant topic: at around the same time this began happening, I noticed that my hard drive usage went down by around 90GB.... I have no idea why this happened or if its relevant, but any possible explanations for that would be nice too.

CoolGamer48 65 Posting Pro in Training

I think I found my problem. For some reason, doing /ubiquity/ doesn't work. I'm under the impression that / would be my public_html directory, and so /ubiquity/ would be public_html/ubiquity/. Anyway, I changed it to ../ubiquity/ (the folder I'm in is also located in public_html), and I don't get an error with the file move.

CoolGamer48 65 Posting Pro in Training

I'm trying to upload .js files onto my sever. This is the code:

<html>
	<head>
	<title>Add Ubiquity Command</title>
	</head>
	<body>
		<form action="add_ubiquity_cmd.php" method="post" enctype="multipart/form-data">
			Name: <input type="text" name="name" /><br />
			Description: <textarea rows="8" cols="30" name="description"></textarea><br />
			JS File: <input type="file" name="file"><br />
			<input type="submit" value="Add Command" /><br/>
		</form>
		<?php
			if(isset($_POST["name"]))
			{
				$con = mysql_connect("localhost", "usr", "pass");  
				mysql_select_db("alecbenz_general");
				
				if($_FILES["file"]["error"] > 0)
				{
					echo "Error: ".$_FILES["file"]["error"];
				}
				elseif($_FILES["file"]["type"] != "application/x-javascript")
				{
					echo "Error: file not a Javascript file";
				}
				elseif(file_exists("../ubiquity/".$_FILES["file"]["name"]))
				{
					echo "Error: filename already being used.";
				}
				else
				{
					if(!(move_uploaded_file($_FILES["file"]["tmp_name"],"/ubiquity/".$_FILES["file"]["name"])))
					{
						$error = error_get_last();
						echo "Error uploading file:<br />Type:".$error["type"]."<br />Message:".$error["message"];
					}
					else
					{
						echo "File uploaded<br />";
						$sql = "INSERT INTO ubiquity_cmds (name,description,js_filename) VALUES(".$_POST["name"].",".$_POST["description"].",".$_FILES["file"]["name"].")";
						if(mysql_query($sql,$con))
						{
							echo "Command added";
						}
						else
						{
							echo "Error adding command: ".mysql_error();
						}
					}
				}
			}
		?>
	</body>
</html>

I get this error:

Error uploading file:
Type:2
Message:move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpuveovn' to '/ubiquity/cmd_echo.js'

Anyone know what a possible problem might be?

CoolGamer48 65 Posting Pro in Training

Does mysql_real_escape_string() escape HTML character entities? I want people on my comment board to be able to post quotes in their comments, but they get escaped as raw ascii, so I run them through htmlentities() first, but it doesn't help. I only get it to work when I remove mysql_real_escape_string(), like this:

nl2br(strip_tags(/*mysql_real_escape_string(*/htmlentities($_POST["comment"],ENT_QUOTES)))/*)*/

. Is this expected?

CoolGamer48 65 Posting Pro in Training

Hey,

Are any of the brands of memory considerably better than any of the others? Should I worry about that, or should I worry more about the actual memory I'm getting.

thanks.

CoolGamer48 65 Posting Pro in Training

Hey, I'm a first-time builder, and I just have some questions about what components to get.

1. How many watts do I need for my power supply? I know there are calculators for that online, but I'd rather get a rough estimate from a human. I'm getting an Intel Core 2 Duo E8400 - 3.0GHz, 8GB of memory (4 DIMMS), one 7200 rpm hard drive, a GeForce 9800GX2 with 1GB of DDR3, and a Sony DRU-V200S/BR DVD Rewritable Drive. I'm also probably going to buy an extra heatsink, though I'm not sure which one yet.

2. Do I need liquid cooling? First off, is it only cooling the processor, or other things that produce heat as well (are there other heat-producing parts to worry about?). Are liquid cooling systems only for extreme overclocking? How much would I have to overclock my processor (mentioned in #1) to need a liquid cooling system?

Thanks.

CoolGamer48 65 Posting Pro in Training

Err... ok, ran into a prob again (like my first one). fyi ive gone back to the multiple member system (r,g,b,a as four separate variables). I still can't figure out how to let users pick whether or not to give the alpha bits. If they give (in a ARGB format) 0xee00ff00 (slightly transparent green), I'll read it fine, but if they give 0x00ff00, I'll read the alpha value as 0x00, when it should be 0xff. So my fix didn't really fix anything I guess. Any ideas on how to get this to work?

CoolGamer48 65 Posting Pro in Training

Oh, you're right.

But actually, I dropped the system of using different members for red, green, blue, and alpha. I'm just using a single hex value as a member to save space.

Edit:
Just wondering, would this be any faster:

unsigned int red = (hex << 8) >> 16;
//or is it:
unsigned int red = (hex << 8) >> 24;
VernonDozier commented: Interesting question. +6
CoolGamer48 65 Posting Pro in Training

Wow, nvm - just figured it out.

Have alpha be first, not last.

But if someone could confirm that and/or check the above code I'd appreciate it.

CoolGamer48 65 Posting Pro in Training

Hey

I'm writing a color class, and I want to have a constructor that can take in an unsigned int like 0x00FF00FF and interpret it as fully opaque green. I have code for that (I think it should work, could someone check it?):

rzb::color::color(unsigned int hex)
{
	m_red = (hex & 0xff000000)/(0x00ffffff);
	m_green = (hex & 0x00ff0000)/(0x0000ffff);
	m_blue = (hex & 0x0000ff00)/(0x000000ff);
	m_alpha = (hex & 0x000000ff);
}

The thing is, I'd like the user to also be able to give this input: 0x00FF00, and have that also be interpreted as opaque green (alpha value would be FF by default), but I can't figure out how to do that. Is there a way to check the length of a number passed as input (or some other algorithm to do what I want). I can't just compare the values, because 0xffffff (opaque white) comes out to 16,777,215, but 0x0000ffee (slightly transparent green) comes out to 65,518, a smaller value, even though it's the the larger form.

CoolGamer48 65 Posting Pro in Training

I'm not aware of any 64 bit games, but it doesn't matter, as 32 Bit software works just fine on a 64 bit platform.

I know, but like I said, Dell's offering a better video card, but no 64-bit OS, while HP has the 64-bit OS, but a slightly worse video card. So if there aren't too many 64-bit games, I'd prob go with the Dell.

a 32 Bit OS doesn't really use 4 GB of memory, as part of it is already assigned to other functions.

Will that part of it not be used with a 64-bit OS? (assuming I still have 4GB of physical)

CoolGamer48 65 Posting Pro in Training

>64 bit computing is more or less the norm now.
I'm a gamer/aspiring game programmer, and I'm getting a computer mostly for gaming. Right now I'm torn between HP and Dell. Dell doesn't offer a 64-bit OS with the model I want, but the HP model doesn't have as good of a video card as Dell. Are there many 64-bit games?

Also, perhaps a more important question, if I'm only getting 4GB of RAM, will a 64-bit OS help me at all? Is that fact that Vista recognizes only around 3.xGB related to the fact that it's 32-bit, or will that memory be used up even in 64-bit Vista?

CoolGamer48 65 Posting Pro in Training

Hey. I'm planning on buying a desktop, but I'm a little confused as to the difference between 32-bit Vista and 64-bit Vista, and exactly what those differences entail.

Now, I think the technical difference is the size of the memory bus. Well, if I'm right, I'm not exactly sure what that means. Does it mean that the address of a memory location can be 32/64 bits long? Or does it have to do with accessing memory? Or both? I could use some clarification on that.

Now, I've also heard that one of the results of this is that a 32-bit OS can only deal with up to 4GB of RAM. However, I've also heard 3 GB. An article I read said that the limit was 4GB, but some computers register less than this because some of the memory is used for address mapping. Is the whether you have a 32/64 bit OS relevant to this space taken up for address mapping?

And lastly, I heard that software designed for a 64-bit OS won't work on a 32-bit. That makes sense, but I'm unclear as to whether software designed for a 32-bit OS will work on a 64-bit.

Please and thank you.

CoolGamer48 65 Posting Pro in Training

So #import is specific to Obj-C?

CoolGamer48 65 Posting Pro in Training

Hey,

I'm learning Objective-C, and they use #import "File.h" instead of #include "File.h" . The tutorial I'm using says that import is like an include once thing, and it basically implements the #ifndef blocks that's normally done manually in C++. I was just wondering if this is something specific to Objective C, or if it's built into the C predecessor, and technically could be used with C++, but just isn't commonly.

CoolGamer48 65 Posting Pro in Training

The rand() function does not return a pointer to an int. It just returns the int. (reference)

So attempting to delete it is causing your error.

Wait, are you talking about this line:

*drawn = rand() % 52+1;

rand() returns an int but drawn has been dereferenced so isn't it also of type int?

CoolGamer48 65 Posting Pro in Training

@williamhemswort
namespaces shouldn't end with a semicolon (though AD didn't point that out so I'm not sure I'm right about that...). I also don't think non const variables can be defined outside a function, though I could be wrong about that as well. Not sure what's wrong with the using statements.

edit: Checked cplusplus.com - right about no semi-colon, wrong about initializing non-consts.

CoolGamer48 65 Posting Pro in Training

The reason the line you commented isn't working is because save.dna[i] is of type char, but "T" is of type char* (I believe, maybe it depends on the compiler?). Try changing it to 'T'

CoolGamer48 65 Posting Pro in Training

Well, I don't agree with this. The streams are declared friends of the class Nibble so they should have the right to access private data. Here's the modified code, where the union yields a variable that simply holds an int--

Oh, right. At a glance I thought they were method declarations, not prototypes for global functions.

CoolGamer48 65 Posting Pro in Training

Don't use spaces between in the code tags for them to work.

That code is swapping the variables word and word[j]. Temp is needed to do the switch (at least the way it's being done here).

Say you have a bucket A full of orange juice and bucket B full of water. To swap them you'd need a third bucket named temp. First, pore the oj in A into temp. Now A is empty (well, not in the program, but just roll with it), and temp has oj. Then, pore the water from B into A. A has water, B is empty, and temp has the oj. Now, dump the oj from temp into B. There. You've swapped them.

Hope this helped a bit.

CoolGamer48 65 Posting Pro in Training

Post the errors and a description of your problem/question.

edit: Sorry, didn't see the comments in your code. Still good to post a description of the issue though.

I see a couple of strange things, but the one related to your union:

union
{
int number : 4;
};

What are you trying to do with the colon? Also, I don't believe there's a point to a union with only one element.

I think the error may be caused because the overloaded operator you're defining is a global function, and it's trying to access a private member of a nibble.

CoolGamer48 65 Posting Pro in Training

Um, when you say thread, you mean like a multi-thread program, where each thread gets its own share of processor time? I don't have much experience with multi-threading so I don't know if/how it's relevant.

Ignoring that, you basically want a method of m_player to have access to m_library? A simple way to do that would be to pass m_library as an argument:

player::play(char* filename,library* my_library)
{
     /* do work */
    ... 
    /* now select the next track from m_player
        to be played */
}

Then, just call the function from a method of mainFrame and pass m_library as the second parameter.

Also, std::strings win.

CoolGamer48 65 Posting Pro in Training

1. You didn't listen to one of the above posters. Don't do this:

cin >> name;

If I type a name that's larger than 20 characters your program will crash.

2. Unless this is for a class and your instructor says you must use character arrays, use std::strings. They're so much easier to work with.

3. Are you sure the output in the image came from the program above? Nothing in the program should cause "Press any key to continue" to appear (unless it's something to do with stdafx.h, of which I know little).

CoolGamer48 65 Posting Pro in Training

Do you indeed want to make it have a GUI? If so, follow linux0id's advice - you're going to need to use some sort of API.

CoolGamer48 65 Posting Pro in Training

Any method of the mainFrame class has access to both m_library and m_player.

So you can have a method called GetNextTrack() (or w/e):

class mainFrame : public Gtk::Window
{ 
public:
     void GetNextTrack()
     {
          //m_library and m_player can both be accessed in this scope
     }
private:
     library *m_library;
     player  *m_player;
}
CoolGamer48 65 Posting Pro in Training

Are you on a console? If so, I don't think there's a good, definite way to do that (though I could be wrong).

CoolGamer48 65 Posting Pro in Training

i think instead of directly assigning one string to another u should use strcpy function..try it...

Kind of off topic, but strcpy() is meant for use with C-Strings (i.e., char*). When using std::strings (which you should :) )you use the (overloaded? ) assignment operator.

CoolGamer48 65 Posting Pro in Training

I don't understand why it says assigning either. If it said casting or converting or something like that then I would get it. Because true really isn't of type int, it's of type enum bool, so when comparing it to an int there has to be an implicit cast or conversion, which is probably what the warning is about.

CoolGamer48 65 Posting Pro in Training

Moral#2: Never, never use bool, true and false identifiers in your C++ programs, even if you have a very old compiler...

Wait - you're saying to not use variables of type bool?

CoolGamer48 65 Posting Pro in Training

A vector is a dynamic array. You can use the push_back() method to add an element to the end of the vector, and you can use the overloaded [] operator to access elements. That's just a quick overview though, see the link for more detailed information.

Also, I regret making that comment a few posts above. I think it would be much easier to put the member data into two separate files, one for full and one for young. I hadn't thought of that when I made the post.

CoolGamer48 65 Posting Pro in Training

You've got the basic idea right I think - just some minor typos and mistakes. I don't want to point out all of them - try to figure them out - read over the program (some lines in particular you may want to look over are the lines that are mentioned in the errors).

Few things I'll help you with:

annualWeather.totalRainfall[i];

That is incorrect. It should be:

annualWeather[i].Rainfall

Also, in the definition of the getdata() function: you have this:

void getdata(WEATHER annualWeather[i]&)

First of all, what is i? It hasn't been declared in this scope. Get rid of it. And the & should be between WEATHER and annualWeather[].

CoolGamer48 65 Posting Pro in Training

The above post could have been a place to post your errors - but no matter.

Get rid of this line:

struct Weather;

Move the definition of the month struct to where the struct Weather line was.

Change month from an array of strings to an array of months. you might also want to name it months, since the name month is taken by a struct, and the plural is more correct. Also, you only have enough space for 11 elements in the array, meaning the maximum index is 11-1 = 10. you want enough room for 12 months.
i.e:
change this:

string month[11];

to

month months[12];

Remove the 12 lines after that. (the month[0] = January lines)

That's all the precise code I'm giving up. Try to fix the rest on your own. Then post updated code with more specific questions.

Hint: you will need a loop in your program

CoolGamer48 65 Posting Pro in Training

Always post your errors!

struct Weather

What is this? The syntax is improper and I'm not sure what you're trying to do.

month[0] = January;
month[1] = February;
month[2] = March;
month[3] = April;
month[4] = May;
month[5] = June;
month[6] = July;
month[7] = August;
month[8] = September;
month[9] = October;
month[10] = November;
month[11] = December;

This is executable code and cannot exist outside of a function. Put it at the beginning of main (or in some other function called at the beginning of main)

RainFall;

What's this?

cin.getline(rainfall.Inches, RAINFALL_LENGTH);

What is rainfall? Where is it declared?

These are just a few.

CoolGamer48 65 Posting Pro in Training

It might not be that simple if you also need to keep track of whether a member is full or young. You would need to output that in some form to your text file, and then as you read the data, create an appropriate object based on whether its a full or young member.

CoolGamer48 65 Posting Pro in Training

Oh - sorry, there was an error in my overloaded extraction operator:

ifstream& operator>>(ifstream& fin,MemberRecord& mem)
{
    fin >> mem.name >> mem.age >> mem.balance;
    return fin;
}
CoolGamer48 65 Posting Pro in Training

the string::c_str() method converts the contents of an std::string to const char*. For example:

string str1 = "Hello";
const char* str2 = "Hello";
str1.c_str();//would return a value equivalent to str2

further information here

You'd be better off using string streams though. there isn't a need to convert an std::string into an old C-string (const char*). string streams can handle std::strings and C-strings.

Salem commented: Say yes to string streams, no to atoi +20
CoolGamer48 65 Posting Pro in Training

Always post the exact errors you get for the best help.

atio() takes input of type const char* .

do this:

x=atoi(str.c_str());

Or, better yet, use stringstreams:

#include <sstream>
using namespace std;

int main()
{
    stringstream ss;
    int x;
    string str = "34";
    ss << str;
    ss >> x;

    return 0;
}
CoolGamer48 65 Posting Pro in Training

Right - that's mouse input. You need to be able to know when and in what direction the mouse moves and when buttons are pressed. Like I said - you can use DirectInput.

CoolGamer48 65 Posting Pro in Training

firstly, you need to have a structure that can hold all the data that you need. In the example, this would be vector<MemberRecord>. As far as loading a MemberRecord into your program, you have a couple of options. Say you store data like this:

John 42 15.69
Bill 34 17.89

Meaning that John is 42 and has $15.69 and Bill is 34 years old and has $17.89. Say your structure looks like this:

struct MemberRecord
{
    std::string name;
    int age;
    float balance;
};

You could extract the data manually:

MemberRecord mem;
ifstream fin("myfile.txt");
fin >> mem.name >> mem.age >> mem.balance;
myvector.push_back(mem);

Or you could define a custom extraction operator for it:

ifstream& operator>>(ifstream& fin,MemberRecord& mem)
{
    fin >> mem.name >> mem.age >> mem.balance;
}

//... in some other function:
fin >> mem;
myvector.push_back(mem);