Lv 43,515 points

rawlings12345

Favorite Answers19%
Answers649
  • c++ fstream problems?

    For some reason, the void function named "senddata()" is unable to open my excel document, even though the document was opened and closed previously by another function "getdata()". Here's a chopped up version of my program:

    const int columns = 4;

    const int infosize = 20;

    const int rows = 200;

    char initial[1][1][10000];

    char soldier[rows][columns][infosize];

    void main()

    {

    getdata();

    mainscreen();

    senddata();

    }

    void getdata()

    {

    excel.open("example.csv", ios::in | ios::binary);

    if (!excel)

    cout << "ERROR: Cannot open file.\n";

    excel.read(reinterpret_cast<char *>(initial), sizeof(initial));

    [random coding]

    }

    void mainscreen()

    {

    [random coding]

    }

    void senddata()

    {

    excel.open("example.csv", ios::out | ios::app);

    if (!excel)

    cout << "ERROR: Cannot open file.\n";

    excel.write(reinterpret_cast<char *>(soldier), sizeof(soldier));

    _getch();

    excel.close();

    I threw in the _getch() in the senddata() function to see what was going on, and that's where I can see the (!excel) expression catching and giving me the output I specified. I just don't understand why it can't open the file. I mean, it opens the file just fine in the first function. I close it properly. Yet it just won't open in the other function. Any ideas??? Much appreciated.

    1 AnswerProgramming & Design1 decade ago
  • Where did C go?!?

    Take the equation below, trace the steps, and tell me what happened to variable C.

    A = B + C (multiply both sides by (A - B))

    A(A - B) = (A - B)(B + C) (multiply this out)

    A^2 - AB = AB + AC - B^2 - BC (now subtract AC from both sides)

    A^2 - AB - AC = AB - B^2 - BC (now simply each side by factoring)

    A(A - B - C) = B(A - B - C) (now divide both sides by (A - B - C)

    A = B (what happened to C?! My original equation stated that A = B + C, not that A = B. Where did C go?)

    7 AnswersMathematics1 decade ago
  • Xian = Christian, funny huh?!?

    The thing in the Atheist circle for many years is to abbreviate the word Christian with xian. Don't know why, just seems to be. Anyone notice that xians (I mean, Christians) are taking offense to this? I think that's hilarious! All I'm doing here is spelling a word wrong (which is the IN thing to do in Yahoo Answers) and they are flipping out about it! Wow! So, xians, does it really hurt? Maybe we should change the defination of what xianity means and start spreading it as 'gospel', just like xianis do about Atheism. So, xians, if you can answer the following questions right, I will no longer use the phrase xian, deal?

    1. What is the definition of Atheism?

    2. What scientific proof is there for xianity (I haven't lost yet)?

    3. How long has the motto "In God We Trust" been on our money?

    4. What was the original Pledge of Allegiance?

    5. What is the most significant statement in the Treaty of Tripoli?

    23 AnswersReligion & Spirituality1 decade ago
  • Questino 39 on 1funthing?

    Man, I thought I was good at math, but question 39 has me stumped. I think you have to calculate the volume of a quadrilateral that has the following measurements for it's sides: 280" x 480" x 580" x 200" and is 11" deep. Any body remember the law of cosines?

    1 AnswerMathematics1 decade ago
  • How many actors/acteresses have performed in 2 sets of trilogies?

    I can think of one, Sylvester Stallone. He was in the Rambo trilogy, and all the Rockys. Can you think of others?

    2 AnswersCelebrities1 decade ago
  • Where does the engagement ring go in reference to the wedding band? In front, or behind?

    My wife and I argue about this all the time. She says the wedding band is on the bottom because it is closer to the heart. I say it goes on second, because thats the order you get them, and it 'seals' the love. What are your thoughts?

    27 AnswersWeddings1 decade ago
  • Who are the two highest ranking U.S. military people of all time?

    Do not count the president, even though he is the commander in chief of all the services, he is a civilian, and therefore, not a mlitary member.

    7 AnswersMilitary1 decade ago
  • What is the highest amount of points you can have in one hand in Cribbage?

    Yes, I am including the draw card too. Please explain how you get the number aswell.

    4 AnswersCard Games1 decade ago
  • What is the best cheat code ever created?

    Thinks like the Konami code (up, up, down, down, left, right, left, right, B,A), or the blood code for Mortal Kombat on Sega Genesis (A,B,A,C,A,B,B). Let me hear what you think?

    2 AnswersVideo & Online Games1 decade ago