15,300 Posted Topics

Member Avatar for denethor

In C language, before version c99, you have to declare all objects at the beginning of the block. Reverse the order of lines 8 and 9 so that the declaration of pFile is the first thing in the function. C++ does not have that restriction.

Member Avatar for Ancient Dragon
0
185
Member Avatar for blez

>>from my mobile phone Do you really mean you want to write a progrm [b]for[/b] your mobile phone? I know of no compiler that runs on a mobile phone. You will first have to find out what operating system it is running. Is it Microsoft Mobile 5.0 or something else. …

Member Avatar for vijay.kanta
0
1K
Member Avatar for Ancient Dragon

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.

Member Avatar for Dani
0
122
Member Avatar for dan1992

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.

Member Avatar for dan1992
0
170
Member Avatar for yoni0505

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()](http://www.daniweb.com/software-development/cpp/threads/421828/getting-base-address-of-a-process) 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 …

Member Avatar for BobS0327
0
5K
Member Avatar for AskAtum

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 …

Member Avatar for Coloradojaguar
0
231
Member Avatar for Sahil89

> 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.

Member Avatar for Sahil89
0
116
Member Avatar for boiishuvo

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

Member Avatar for zeroliken
0
188
Member Avatar for Labdabeta

Have you worked through some winsock tutorials? ([click this](http://search.mywebsearch.com/mywebsearch/GGmain.jhtml?searchfor=winsock+tutorial&x=0&y=0&st=tab&si=101497_819pcc&ptnrS=CDchr999YYus&ptb=E426119D-E1FE-4134-AB7A-C6FDE5ABCFF5&n=77ed268a))

Member Avatar for Labdabeta
0
201
Member Avatar for alaa sam

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 …

Member Avatar for Ancient Dragon
0
127
Member Avatar for McLaren

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 …

Member Avatar for Coloradojaguar
0
171
Member Avatar for eltonpiko

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.

Member Avatar for Ancient Dragon
0
97
Member Avatar for McLaren

> 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 …

Member Avatar for Lardmeister
0
221
Member Avatar for sanjuktamuna

You don't use & to pass characters arrays by address, they are always passed like that example: scanf("%s",cus[i].name);

Member Avatar for Vish0203
0
177
Member Avatar for benclifford

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.

Member Avatar for triumphost
0
560
Member Avatar for DavidKroukamp

> 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 …

Member Avatar for Dani
0
320
Member Avatar for Infame

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 …

Member Avatar for Ancient Dragon
0
157
Member Avatar for Ancient Dragon

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 …

Member Avatar for diafol
0
87
Member Avatar for MasterHacker110

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`, …

Member Avatar for MasterHacker110
0
172
Member Avatar for Dani

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

Member Avatar for Airshow
3
278
Member Avatar for jbennet

[url=http://www.daniweb.com/forums/member.php?u=888707]dioioib[/url] has reported a post. Reason:[quote]advertisement[/quote] Post: [url=http://www.daniweb.com/forums/showthread.php?p=1783437#post1783437]Formatting disks on MAC OSX[/url] Forum: Mac OS X Assigned Moderators: Tekmaven, crunchie, blud, jbennet, WaltP, Nick Evan, PhilliePhan, DimaYasny, Ezzaral, jholland1964 Posted by: [url=http://www.daniweb.com/forums/member.php?u=949872]Klementina[/url] Original Content: [quote]OnSite.ru —a system that allows you to create your own web sites and manage them without …

Member Avatar for Airshow
0
2K
Member Avatar for TrustyTony
Member Avatar for alanso

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 …

Member Avatar for alanso
0
198
Member Avatar for benclifford

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., …

Member Avatar for benclifford
0
388
Member Avatar for subith86

> 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.

Member Avatar for mitrmkar
0
3K
Member Avatar for don't give up

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](http://www.asciitable.com/). 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 …

Member Avatar for don't give up
0
186
Member Avatar for Daigan

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 …

Member Avatar for Ancient Dragon
0
218
Member Avatar for _hp_

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.

Member Avatar for Ancient Dragon
0
246
Member Avatar for visitor11

Probably some file(s) need to be recompiled. Select menu Build --> Clean Solution, then rebuild the solution and that normally fixed the problem.

Member Avatar for Ancient Dragon
0
171
Member Avatar for wildplace

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.

Member Avatar for wildplace
0
75
Member Avatar for hwoarang69
Member Avatar for zeroliken
0
179
Member Avatar for dmoneyrpyt

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. …

Member Avatar for zeroliken
0
255
Member Avatar for Ancient Dragon

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

Member Avatar for Dani
0
259
Member Avatar for weeziefoo

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 …

Member Avatar for weeziefoo
0
608
Member Avatar for n4j

What exactly is the problem you have? Are you trying to read the whole file into memory at one time? Or just read small parts of it?

Member Avatar for n4j
0
116
Member Avatar for Vasthor
Member Avatar for Sahil89

> 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?

Member Avatar for Sahil89
0
162
Member Avatar for WaltP

5) annoying, but I can live with it. 4) Agree completly with Walt. There must be an easier way top quote someone other than manually copy/paste Since you hate vBulletin's implementation, maybe a copy button that only copies/paste highlighted text.

Member Avatar for Airshow
1
246
Member Avatar for Ancient Dragon

I copied/pasted the html code for my member badge into my vBulletin web site but it doesn't work. All I get is the html code and not the badge image. What's wrong?

Member Avatar for Ancient Dragon
0
150
Member Avatar for Valiantangel
Re: %d

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 …

Member Avatar for Ancient Dragon
0
122
Member Avatar for butler273

It is better to pass the ofstream as a parameter instead of making it a global because globals are generally frowned upon. Pass by reference, you can't pass it by value.

Member Avatar for Ancient Dragon
0
124
Member Avatar for willjohanz

Deposit $10,000.00 USD in my paypal account and I'll write it for you. :)

Member Avatar for Ancient Dragon
-1
92
Member Avatar for Ancient Dragon

I have to get me one of these :) http://www.youtube.com/watch?feature=player_embedded&v=WOoUVeyaY_8

Member Avatar for MosaicFuneral
0
59
Member Avatar for Jorox03

> ifstream in( ); line 36: Inside the parenthese you put the full path to the filename. But you have that line in the wrong place ~~~ do { if( !fd.attrib & _A_SUBDIR ) { ifstream in(findPath+fd.name); while( getline(in, line)) { // blabla } } } while( _findnext() ); ~~~ …

Member Avatar for Jorox03
0
394
Member Avatar for jwill222

The links don't work. Its better to just use he Advanced Editor (link at the underneath the message editor) and upload the pictures to your thread. [code] #include <iostream> #include <string> [/code] Those are c++ header files, not C. You can't compile that program with a C compiler.

Member Avatar for jwill222
0
275
Member Avatar for Rasool Ahmed

> The reason of this behaviour is that the readfile read the file until get NULL I think you misunderstood. ReadFile() reads in binary mode, the same as fstream.read() or in C fread(). You tell it how many bytes to read and it will read that many bytes, or until …

Member Avatar for Nick Evan
0
2K
Member Avatar for abhishekagrawal
Member Avatar for Ancient Dragon
0
146
Member Avatar for Labdabeta

The only file you need in the test project folder is the *.dll. Actually, you can put it any of the folders listed in your PATH environment variable, such as c:\windows\system. As for the *.h file(s), just put the full path to where they are located in the include statement, …

Member Avatar for Labdabeta
0
253
Member Avatar for T0pAz

If you google for that error message you will get some help, for example this link: http://www.west-wind.com/weblog/posts/2012/Jan/13/Unable-to-cast-transparent-proxy-to-type-type

Member Avatar for T0pAz
0
305
Member Avatar for tubby123

The loop is wrong ~~~ while( fscanf(...) > 0) { printf ("Integer read = [%d]\n",i); } ~~~

Member Avatar for Ancient Dragon
0
101

The End.