Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How much or little work that is going to be is almost impossible for anyone to say without seeing the actual code, knowing the differences between the two versions of the files, and which functions your program uses. For example, are all the SDL include files listed in one single include file that is common to all *.c files? Or does each *.c file include the SDL includes? That might not be relevant if the names of the include files are the same between both versions of SDL.

About the only way you are going to find how how much or how little work is involved is to attempt a complete compile using the new header files and libraries. At best everything will compile and link without any errors. At worst you or your team will have to make a lot of changes to existing code in order to get a clean compile. It shouldn't take but a few minutes to find out one way or the other.

Can anyone provide me proper steps for the same

There is no one proper way to do it. The way I would tackle that is
1. Create a new folder for the new version of the project
2. Copy the game's source code (*.c and *.h files) into that new folder
3. If you use an IDE, such as Code::Blocks, then make necessary changes so that it uses the *.h files from the new version of SDL …

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Maybe you should have a contest to see who can come up the the best name. And maybe you should sell it as a competitor to vBulletin

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

How do we add an attachment to a post? Or is this a future enhancement?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster


Rabbits
. Posted on Facebook by George Takel from Star Trek

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

IMO, the new list of reputation comments is more informative than the one vBulletin had. You don't think so?

Yes that's what I'm looking for, but I can't find that link on my Profile page!

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I'd like to see the list of reputation comments in our Profile similar to the one that was in vBulletin.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Another possibility -- might need a new battery. They don't last forever.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Cool! Some of those are very true, especially the line graphic of alcohol consumption vs progframming skill.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

strcmp() won't work for you because it expects an exact match.

you can call strstr() to see if the line contains "-hello". If it does, then check for anything following to see if something other than spaces. You may need to do additional checks if there is a chance that the line will contains other stuff, for example "-HelloWorld" because strstr() will return valid pointer for that also.

char* ptr = strstr(line, "-hello");
if( ptr != NULL)
{
   // now check remainder of string to see if 
   // there is anything but spaces following the
   // text -Hello.
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The easiest way is not to return the matrix at all, but declare it in main() and pass it in as a parameter. This works becuse arrays are always passed by reference, never by value.

void matrixGenerato(int matrix[][3])
{

}


int main()
{
   int matrix[3][3];

   matrixGenerato(matrix);
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

*.txt and *.ini files should be simple and straight forward to process as you described in your post. I don't know how the subject of this thread fits into that. *.docx files are more problematic because the are binary files, not text files. Other languages such as VB.NET and C# would be better suited to process *.docx files, which asre witten by Microsoft Word or Open Office.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Your first error is assuming there are exactly 20 characters in the line. What if there are 25 spaces? Or only 1 character and it is a space? To solve that problem check for end-of-line terminating character '\0'.

int empty_line(char line[])
{
   int i;
   for(i = 0; line[i] != '\0'; i++)
   {
      if( !isspace(line[i]) && line[i] != '\n')
         return 0; // not an empty line
   }
   return 1; // empty line
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

And we're forgetting one ... Congrats to Sanjay for being promoted to co-Administrator! :)

Does that mean we get to curse at him when things don't go right :) LOL Just kidding. Congratulations Sanjay. You have been one of the best contributors here and you deserve the promotion.

And congrats pyTony and ardav, now you have your work cut out for you.

~s.o.s~ commented: Thanks Melvin :) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The problem is that winner will never have the '1' or '0', it will have character that has ascii value 1 or 0

Huh? '1' has an ascii value of 48, 1 does not. Unless I missed something I don't see that as a problem with that program as long as the OP consistently uses '0' and '1' instead of 0 and 1.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Looks like all my posts were queued up because they are all there now.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Oh, I know that feeling -- been there and done that :)

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what are lines 1-7?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

assembly

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Can you put up some sort of message telling us that the tables are locked so that we don't waste a lot of time trying to figure out what's wrong?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Back to a previous bug that was fixed but now broken again. I can't save changes to my post.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I can't save any posts tonight. Cleared my browsing history but that didn't help.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I can't save edit changes in posts. I cleared browsing history but that didn't help.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Advice? Yes,just do as you were told. What don't you understand about the instructions? What have you done so far to correct your program?

node* start; //but arent these the two
//pointers being referred to?

No. He means to put two pointers inside he structore, one for next and the other for previous nodes within the linked list.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Alot will depend on how much c++ you already know. Do you know about classes and <vector> yet?

Start out by generating the two required text files. Then write a very simple program that opens and reads them.

Don't get overwhelmed by the complexity of the program. Code, compile and test just small parts at a time.

Will I write the program for you? I could, but I won't.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The only way to process text files is to read them sequentially, start to finish. Text files generally don't allow for random access. One trick I've used in the past with text files which must be read frequently is to set up a fixed-length record index file which contains line numbers and the offset in the file where the line number begins. This only speeds up frequently reading the file, not writing. You have to completly rewrite the file if the new text is longer or shorter than the existing text. For example you can't just simply overwrite the word "the" with the word "them". But if you want to overwrite "the" with anothr 3-letter word then you can just overwrite it, assuming you know the offset of the start of the word.

A better answer to your question will depend on what you mean by "process the file". It might mean that you need to read a block of lines into memory, process them, and rewrite them to another file, then repeat that until the entire file is processed.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

there was an option in our profile to sort theads either in ascending or descending order by date posted. Over on PFO its called "Thread display Mode", found in the Edit Options menu.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Hint

#include <iostream>
#include<ctime>
#include <string>
#include <iostream>
#include <ctype.h>
#include <cstring>
#include <locale>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;

int main()
{

    char aword[] = "House";
    char bword[] = "university";
    char cword[] = "computer";
    char dword[] = "text";
    char eword[] = "picture"
    char words[100] = {0};

    strcat(words, aword);
    strcat(words, bword);
    strcat(words, cword);
    strcat(words, dword);
    strcat(words, eword);

    srand((unsigned int)time(0)); // seed random number generator
    int wNum = rand() % 5; // get random word
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You might check CodeProject to see if they have anything useful for you. That site has the largest repository of C/C++ code for MS-Windows that you can find on the internet. Well work bookmarking if you use that os.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

line 5, form2. That is not the same as the original instance of form1, which is why you don't see the changes when from1 returns. What you want to do is to set a public int in form2 that can be read by form1 when it regains control, then use that information to set its TopMost property appropriately.

Something like below: warning: I didn't compile this so it might contain compile errors.
but you get the idea.

namespace xyz
{
    public partial class Form1 : Form
       { 
    form2 pqr = new form2();

    private void openform2_Click(object sender, EventArgs e)
        {

            pqr.Show();
            this->TopMost = pqr.GetTopMost();
        }
    }
}


 namespace xyz
    {
        public partial class Form2 : Form
           { 
           private bool IsTopMost = false;
        form1 backform = new form1();

        private void ok_Click(object sender, EventArgs e)
            {

                 if (ontop.Checked == true)
            {
                IsTopMost = true;
            }
            else
            {
                IsTopMost = false;
            }
public bool GetTopMost() { return IsTopMost; }
            }
        }
    }
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

This thread is getting sooooo big that I don't know if this question has already been asked. Are you going to implement in our profiles sort order of threads, such as from oldest to newest or vice versa?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Is it text or binary? What operating system and what compiler?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

code tags work a lot better and easier if you just put ~~~ at the top of the code and again at the end. No need to manually indent the code. Requiring posters to manually indent all the code 4 spaces is just crazy, IMHO.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

The only issue with code tags that I know about is that I have to manually refresh the window after saving a post that contains code. If I don't do that, the text of the code is there, its just not in code tags. When I edit the post I see the code tags and the text, but after Save the code doesn't appear to be in code tags. this was very confusing to me until I realized I had to press the Refresh button on my browser.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You need a while loop to find the correct spot. On line 5 just do a return. Then start the while loop to find out where to put the new node, like lines 30-32.

temp -> price = price;
if((*head) == NULL && (*tail) == NULL)
{
    temp->next = NULL;
    temp->prev = NULL;
    (*head) = temp;
    (*tail) = tail;
    return;
}
temp = (*head);
while(price < temp->price && temp->next != NULL)
    temp = temp->next;
// now insert the new node        
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

In a loop get a single character then perform a switch on it to determine what command is to be executed. Or you can call fgets() to get an entire line from the keyboard and parse it. Just like any other program, just don't try to get too ambitious at first, keep it simple.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

See edlin.exe for an example of command-line prompts

http://www.computerhope.com/edlin.htm

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Why did you create so many threads for the same problem? It just confuses people. see my answer here: http://www.daniweb.com/software-development/c/threads/419598/linked-list-sorting

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Just use a normal sort algorithm, there are lots of them and google will show you the c/c++ source code for most of them. When its time to swap then just swap the data instead of the whole node. If you are not allowed to do that then you will have to figure out how to adjust all the pointers in the nodes.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I don't really care one way or the other. I think the old style of Link button was easier and more intuitive to use, but I'll get accostumed to the way it is now. About the only thing I use is code tags, Link, Quote, and on rare occasions List.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Doesn't SRE93's suggestion solve the problem on *nix?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You didn't answer the other question. If you use Windows Forms it will contain a control that acts like a simple text editor.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

1) Use 64-bit version of VC++, I think its version of fstreams support huge files

2) call win32 api read/write functions which support huge files (see ReadFile() and WriteFile())

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

what operating system and compiler do you have in mind? And do you want a command-line text editor, something like edlin.exe or a graphical program like Notepad.exe?

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

add fflush(stdout) after the printf() statement to force the os to output the text

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

testing

[edittesting again

[edit again] Good! cleaned the cookes and browsing history.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Save Changes works with IE9 but ont on Chrome

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Save Changes button no longer works -- I edited a post of mine but was unable to save the canges. Click the button and nothing happends. Using Chrome on Win7

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Code blocks are created by indenting at least 4 spaces
... and can span multiple lines

Or just start the code in ~~~ and end with ~~~. You don't have to manually indenmt the code that way

//how do i get it to output?

I don't understand the question. That line should output the value of totalQuarters ok. Maybe you should post an example of what you want the program to display.

[edit]Test -- ignore this

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

that makes no sense at all -- you can't put if statements in arrays. Post an example of what you want to do.

Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

./Borland/libxml library/lib/libxml2-bcc.lib: file not recognized: File format not recognized

that error is referring to libxml2-bcc.lib. gcc and g++ do not recognize libraries wth *.lib file extension, only *.a file extension. That library was built for a different compiler.