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

I'd like to see a larger edit box -- one similar to the quick reply box. That one-line edit box is just too small when we want to write several words. What you have now works ok, its just not convenient for larger amounts of text.

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

Forget this ^^^ -- apparently you changed your post since I read it the first time.

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

You have to allocate memory for hModules array before calling EnumProcessModules() because that function doesn't do it for you. Study the MSDN page about EnumProcessModules() more carefully and follow the examples links near the bottom of that page. Don't try to allocate an array exactly the size needed because that will usually fail. Even EnumProcessModules() can't tell you the exact size needed because processes are always changing. So its better to just create some arbitrarily large array of hModules. Go to Task Manager, look at the processes it list, then double that number for your program.

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

name == "James" || "Ellen" || "John") which || means OR, correct?

name == "James" || name == "Ellen" || name == "John"

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

The first parameter to that function needs to be a pointer so that it can be added to the list. What you are doing now is just setting a pointer to a local variable, which goes out of scope as soon as that function returns. You should ALWAYS pass structures by reference (pointers), never by value.
That function might look like this:

void insert( struct mem_chunkI* new_node , int flag)
{
    if( used_chucks == NULL)
       used_chuncks = new_node;
}

In the else statement, if you want to add the new node to the head of the linked list

new_node->next = used_chunck;
used_chunck = new_node;
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Have you worked through some winsock tutorials? (click this)

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

Why do you need a tool to do that? Just use Windows Explorer, create a folder and copy the files into it. Simple.

adam_k commented: That's what I am doing and never needed a tool +8
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

They are all still there -- you have to change the View File settings in order to see them. In Windows Explorer choose menu item Tools --> Folder Options --> View tab, then scroll down to Hide Protected Operating System Files and uncheck it.

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

When I have spare time (suitable for work, but beyond my 40 hour workweek), should I spend it improving my company's software or should I develop my own side projects?

depends on where you are at. If you are in your workplace then do company work because they own you and everything you do even if its beyond the normal 40-hour workweek. If you are somewhere else, then do anything you like -- don't do company work so that you don't get burned out. You need to rest and relax awhile every week. All work and no play makes for a very boring guy.

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

I would like to know your opinions how much time is needed to study so that your knowledge would be up to date and you would not get fired of job? :) I

IT people don't become technologically obsolete over night -- it takes several years for that to happen. You won't be expected to do a lot of studying to keep up-to-date, maybe once a week or so would be sufficient as long as you are competent in your job. Someone going new into the job market may have to study more often in order to improve your knowledge and skils. But at some point you can slow down to more infrequent study periods. That is, of course, unless you plan to be a medical doctor :)

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

You don't use & to pass characters arrays by address, they are always passed like that

example: scanf("%s",cus[i].name);

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

The new Code button is easier to use than ~~~ tags (less typing) As far as I can tell ~~~ doesn't work any more.

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

why do you want to do that? I see no advantage of using pointers in that program, they could actually make it more difficult to read and comprehend the algorithm.

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

I was just able to successfully upvote,

Same here. Maybe he needed to hit the refresh button on his browser -- I have to do that occasionally.

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

I have both a Samsung tablet and an iPod, use neither for online shopping, always use my Windows 7 PC because its easier. I have seen a few (very few) people using tablets while shopping, most likely to do price comparisons or look at their shopping list.

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

I'm now starting to use wordpress to create my web site. I was using vBulletin, but I'm starting to regret that because of its complexity, lack of documentation (for newbe like me), and lack of tech support on their web site. There is a bbPress forums plugin for WordPress but I have not used that much yet. So far, WordPress seems to be fairly easy to create and maintain web sites. I'm still pretty new at this so my opinion at the moment might not mean a whole lot.

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

I don't see where BuildingsArr is declared. If its a pointer, sizeof won't give you what you are lookinig for. sizeof gives you the number of bytes consumed in memory for the object. For pointers, it will be 4 because sizeof(any pointer) is 4.

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

The amount of reputation points you're affecting the member by is now transparent because I think this leads to more genuine voting, without letting how much you're affecting the member sway your vote about the individual post

I don't think its transparent -- the Power to Affect someone else's reputation is in his/her public profile page.

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

No, but one thing you can do is make a linked list of fixed-length strings (like buffers). Just keep adding to the list as data is received. Then when everything is received you can calculate the size needed, allocate the string memory, then concantinate them all together into one big string.

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

call fgets() to get user input, then strtok() to break it up into individual words. I would just statically allocate the array of pointers to strings, for example char* strings[255] = {0}; . You could, as previously mentioned, also use a dynamically allocated array of pointers char** strings = 0, but then you need to call malloc() and realloc() to expand the array to the desired size each time you want to add a new string to it. For small amounts of strings its just simpler and better to just use static allocation.

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

she means that the parameters on line 15 and line 58 do not match. They have to be the same. Also, its best to always pass structures around by reference, never by value, because the program has to duplicate everything in the structure when it is passed by value. You are doing that for the input function, but not for the display function. Passing by value takes CPU time and can slow down your program. Of course it won't be noticeable in simple programs like you are writing, but it will have a performance hit on large programs. So you should get into the habbit of passing structures/classes around by reference now so that you don't have to unlearn bad habbits later on.

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

When I edit this post, why does the text appear in red color in the editor? The color is ok when saved, but red in the editor.

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

So in your example if I enter the string "America" the program should output "gprs"?

In that case you need an array of 2d strings.

char stringlist[99][2][100];

The above will give you 99 2d character arrays. Each string can have up to 100 characters.
stringlist[0][0] = "America"
stringlist[0][1] = "gprs"
stringlist[1][0] = "France"
stringlist[1][1] = "abc"
stringlist[2][0] = "Germany"
stringlist[2][1] = "def"

etc for each string

Now when someone enters "Germany", your program searches stringlist[0][0] to stringlist[99][0] for that text. When found, just output the value in stringlist[x][1] (assuming x is a loop counter 0-99)

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

you know that each letter of the English alphabet has a decimal value, which can be found in any ascii chart, such as .this one. So, to solve your problem all you have to do is subtract the ascii value of 'a' from whatever the user input, then add 1 since you want the values from 1-26, not 0-25. For example, if you enter the letter 'b', the answer would be 'b' - 'a' + 1 = 98 - 97 + 1 = 2 Here is a program example

int main()
{
   char n = '2';
   int value = n - 'a' + 1;
   printf("%d\n", value);
 }

 result:  2

You can now take the above one step further to apply it to the character array that you want. All you have to do is put that math algorithm in a loop .

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

It is correct in putting an asterisk before and after the text you selected, because that is how Markdown italicizes things. It makes it bold though? Are you sure? I just tested it and it didn't do that for me. One asterisk is italic. Two asterisks are bold.

It's ok then -- I was confused about the asterisks and didn't pay attention to the Preview window.

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

The simplest IMHO to solve the error problem is to get input as a string then parse the string to see that it contains all numeric digits. If it's ok then convert it to an integer by calling one of the standard conversion functions. This method has the advantage that the program will auto clear the input keyboard buffer of extraneous keys, assuming you give fgets() a large enough buffer. If the last character returned by fgets() is not the <Enter> key '\n' then you know there are more keys in the keyboard buffer. If '\n' is there, then you know you have all the keys and the keyboard input buffer is empty.

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

In the editor, if I select some text then hit the Italic button it puts a * before and after the text I selected. It also makes it Bold, even though I hit Italic.

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

Possibly line 11 of main.cpp -- std: is a label, you want std:: (two colons, not just one).

The three set functions in the header file should be void functions because they do not return strings. Your compiler should be giving you warnings about that in the implementation *.cpp file., something like "function must return a value"

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

Like the one at the bottom of the page?

Yes, like that one :)

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

me know if the key bindings are working now.

Yes, backspace works now on Chrome.

Dani: Any plans to add Facebook interface? Such as Like button, and FB Connect button?

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

New Link is excellent :)

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

They should try throwing shoes like in other parts of the world, at least they have a better chance of re-using them.

You mean like this?

jkon commented: The problem with that is that it may exist a class “how to avoid shoes” in the corrupt politicians university ;))) +0
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

No. Memory for those pointers in the structure has to be allocated, and the amount of memory to allocate won't be known until you get the results of the query. sqLite won't do that for you.

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

I suggest this one, because ideally a compiler shouldn't crash no matter what you feed it.

Compilers often have bugs just like any other program. I've even had earlier versions of Microsoft compilers crash on me for internal compiler errors.

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

that only points to whre the include files (header file) are located, not the libraries. Check if you have lib/opencv folder.

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

I love the new change for code tags :) :) :) And the ability to hide preview. The backspace key doesn't work in Chrome. but it works ok with IE9

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

how about bumping threads several years old?

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

what error(s) are you getting and on what line numbers do they appear. Unfortunately you didn't use code tags cofrrectly so we can't copy it to our editor and compile it ourselves.

And PLEASE do not type in all caps -- that makes us think you are screaming at us. Very very rude.

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

After you write the string you have to rewrind the file pointer before you can read it again. See fstream's seekp() function and set the file pointer back to the beginning of the file.

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

Post the node strucure. How is node->name declared in the structure?

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

Just taking the person's word for it is not good enough IMHO. I don't want to break any laws by allowing under-age children access to adult-content. I've started googleing for this and found one promising site that provides that service.

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

I have started a new vBulletin site and one of the forums is going to be for adults only, over age 17. Right now when a new member registers he/she can put whateve age he wants. Before allowing access the the adult-only forum I'd like to verify that the person is as old as he claims to be. Is there any way to verify the age?

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

I see a lot of posts where some of the code is in code tags and some not? What's with that?

Example here: http://www.daniweb.com/software-development/cpp/threads/420885/data-structure-stack

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

what is dent_spacel() ?

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

When I was working I never, or rarly, took breaks that laster longer than just a few minutes, such as get up and get a cup of coffee. It really annoyed me to no end when someone interrupted me while I was deep in thought coding, especially those pesty bosses who want staff meetings occasionally. Lots of times I brown-bagged my lunch so that I could eat it at my desk while working. But that was me. In your case may you would be better off just getting a cup of coffeed and chatting up the girls or something for a little while. Ten minutes every hour seems a little excessive to me. The state where I live requires employers to give 15 minute break every 4 hours plus a 30 minute lunch break if the shift is longer than 7 hours.

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

Narue has decided to retire her account on Daniweb

Again! She does that every now and then.

Will you be assigning a Super-Mod to taked Sanjay's place?

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

It is trying to push a string to a vector of integers. Won't work. What you have to do is read the file as integers, not strings. There is a couple ways to do it.

The easiest (IMO) is to use getline() as you have it now, but add the third parameter which is the deliminator. Since the file you are reading is comma-deliminated the third parameter would be ','. The after it is read convert it to int and push that onto the vector.

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

Thanks -- that worked ok.

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

I figured it out, was a matter of enabling html in signatures.

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

If x is a float or double printf() will think its an int because of the %d and try to print it accordingly. On 32-bit compilers the size of an int is 4 bytes while the size of a float is 6 bytes. You might even get strange results for all the other parameters because the float will screw up the order of the parameters on the stack. So if you have "%d%f" printf() will attempt to use some of the float as part of the string, which of course is wrong.

The main thing is to make sure the data types of the parameters match the items in the format. If x is an int then passing either x or &x might depend on the compiler you are using, because &x is a pointer. On some compilers pointers and ints are the same size, while on others, like Turbo C, they are different sizes.