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

>>Why is element not declared?
Because you have recursive includes -- each header file includes the other.

In eventhandler.h try this:

#ifndef EVENTHANDLERH
#define EVENTHANDLERH

class element;  // forward declaration of class

enum events {onClick, onHover};

typedef struct eventHandlerT {
    void(*func)(element *elem);
    events eventType;
} eventHandler;


#endif // EVENTHANDLERH
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I've never seen that problem -- IE7 on Vista Home.

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

I tried that several times without a problem.

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

Once in what time-span? Such as once an hour? once a day? I would probably store the current date/time in the ini file, then on program startup read that information and act according to how often the program should run. such as if its not time to synchronize the clocks again yet then just quit.

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

Let's vote GrimJack for U.S.Pres.

I wanted to vote for Superman, but sadly he died a couple years ago.

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

The pic in your sig?

No that's not my sig -- just a jpg attached file

I like that dress. And believe me, thats not a very revealing dress compared to many.

Oh I quite agree that it's not revealing -- it just looks like a slip.

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

getline() will read the entire line

std::string line;
std::ifstream in("filename.txt");
while( getline(in, line) )
{
    cout << line << "\n";
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

I assumed he wanted to edit. You can view anyone's public profile by just clicking on the avatar.

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

I assume table is an array of integers? Yes?

If you want the numbers aligned up right then add width fields printf(output, "%10d %10d", ...) will print them right justified in a 10 character field. If you want them left justified then add - character printf(output, "%-10d %-10d", ...)

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

>>pers.haemta_betalat() = pers.haemta_betalat() + pny.haemta_betalat();

haemta_betalat() is a function call, you can not add anything to its return value. What you want is this: pers[i].betalat_andras = pers[i].betalat_andras + pny.haemta_betalat(); But that might give you an error too since betalat_andras is a private member of the class. You could fix that too by writing a add function pers[i].add_betalat() = pers[i].haemta_betalat() + pny.haemta_betalat(); where add_betalat() is declare as this:

public:
     void add_betalat(double n) { betalat_andras += n;}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

open the file
read each line
for each line read, search the line for the given word. If you ust std::string to hold the line then use it's find() method. You will probably first have to convert the line to all lower or upper case so that you get case-insensitive compares.

If the word is found then just add it to the array. std::vector is recommended here because it make that process pretty simple.

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

Hey Josh. Yeh back again?

Not for long -- he's been banned again too :) :) :) And this time probably permanently.

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

>>also how can i write 10^ 3

How would you do it in your head? 10 times 10 times 10 right? Then do it the same way -- 10 * 10 * 10. or you could call the pow() function that's in math.h

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

>>how can i declare lowercase n uppercase
You have to use tupper() or tolower() to convert the character. scanf() won't do it for you.

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

M3rcury: the code you original posted is worthless to us. Post the new code (all of it) that you are actually using and which is giving you problems.

And thanks for using code tags correctly, not many new posters bother to do that :) :)

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

this looks like something I sell at Wal-Mart in women's lingerie department. If that's supposed to be a picture of a prom dress then where's the dress ?

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

Doesn't this short poem about love just melt your heart?

Note:
Sorry AD about the dragon slaying stuff, it's not my poem.

No offense taken -- I was slain a lot of times in my D&D games :)

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

Read the list of format specifiers for printf() function. You will see that %d is decimal, %o is octal and %x is hex. With that information you should be able to write your program in just a few lines of code -- one line of code for the actual print statement.

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

>>When I try to compile this Makefile I get errors like boostnb.o is missing.
Well, did you check the file system to see if it is missing? If it is then it didn't compile correctly or you failed to add it to the makefile, and you should have received error message(s).

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

>>What memory model does Dev-Cpp follow...?
Flat memory model, the same as all other 32-bit compilers.

>>And how can I change it to have a segment more than 64 KB of memory
You don't have to change it. You can write a program of about 2 gig in size if you wish.

>>Same thing happens in Code Blocks....
Its not the compilers -- its a bug in your program. Instead of trying to find ways to suck up more memory you should concentrate on fixing the bug in your program.

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

This unacceptable, and I demand that this be fixed! How can I give information when these unkempt forum icons are profaning the digital landscape with their pixels of evil on every other page I visit?

Dictated but not read,
Rashakil Fol

If you are trying to be funny then you need to add a smily face to that statement. If not, then I suspect Dani will just ignore you.

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

When Ronald Reagan took office, the economy was in an arguably worse state than it is now. However, his strives to limit government, and leave the private sector alone helped us to recover, and enjoy the prosperities of the 90s. Obama plans to do the very opposite... Hmmm.... I wonder what will happen...

As much as I liked Reagan -- his policies of limited government seemed like a good idea at the time, but evidentally failed. We are now seeing the results of that policy and similar deregulation.

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

Ok, what is it? An advertisement (spam) for a book from amazon ?

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

There are some legitimate reasons to do such a thing. I've done something similar before so that I could keep the two files together without resorting to writing an installation program.

I think there are at least two choices:

1) compile it as a resource in the resource file.

2) just append it to the end of the executable and extract it yourself whenever you want to. First get the size of the program without the attachment, attach the file, then append another line that is the size of the original program. After than, in the original program add some code that extracts the appended file.

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

It might be your computer, your window resolution setting, or your operating system. install another font perhaps? search www.codeproject.com or some other similar sites for example code.

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

Sorry bud -- we don't condone downloading illegal copies of published books.

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

CSCGAL. I just joined the DaniWeb Community and noticed that I can't even view my profile. It's odd, I can't even figure out how to view my own profile.

Click the CONTROL PANEL link at the very top of the page. You can access your profile from that dropdown menu. I assume new members have access to that -- I don't really know since I'm not a new member :)

I would like to ask you a question. Why did you join DaniWeb, What interest's did you have, and How has DaniWeb been assistive of your interest's and ideas?????

Dani didn't "join" DaniWeb, she created it while in college.

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

You could start here

Microsoft publishes such a book in several volumes, last time I looked at my local book store it cost over $150.00 USD for the set.

And your term "most useful functions" depends on who wants the information. "Most useful" to me might not be the same as "most useful" to you.

When I want a certain win32 api function I just google for it, or search for it at www.microsoft.com.

Comatose commented: *Falls Out Of His Chair Laughing* +10
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

>>Will this work even if we don't know how many values are in the file?
Yes

>> see that line has a size of 255...what if the file ends up having a lot more characters?
That is the number of characters in just one line, not the entire file. The contents of the previous line is tossed into the bit bucket when a new line is read via the while statement. If any one line is longer than 255 characters (unlikely) then increase 255 to fit the line size. I just picked the value 255 out of the air because its unlikely csv files will have longer lines. Allocating too much input buffer space is not normally a problem, but allocating too little can be disasterous.

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

>> could some one help me.
Yes, but only if you post your program.

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

The change shown below made it compile cleanly with vc++ 2008 express compiler

int main()
{
        element *ele, *ele2; // << CHANGED THIS LINE
        
        ele = (element *)malloc(sizeof(element *));
        ele->data = 12;
        ele->next = NULL;
        
        insertElements(&ele, 15);
        insertElements(&ele, 43);
        
        ele2 = (element*)malloc(sizeof(element *)); // << CHANGED THIS LINE
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

You asked google the wrong question. Try this:

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

try changing double *matA[] to double matA[][4]

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

I found this with google -- and you could have too. But I don't know if it answers your question.

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

The "thing" at the start is probably a binary character that tells programs the file is UNICODE format -- its called "UNICODE signature". When you click this link scroll down the page until you find the section titled "unicode signature". Please feel free to read the rest of the page too :)

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

There are literally thousands of win32 api functions, and more are added with each new version of MS-Windows. You will not find all of them in any one place, except possibly MSDN at www.microsoft.com

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

I used a Zebra printer a few years ago that was attached to a wireless barcode scanner from Symbols Technologies. At that time we wrote a C program that send the contents of the *.lbl file directly to the printer via the scanner's rs232 port.

If this is what you have in mind then you will have to read the Zebra printer's programmer's documentation to find out how to interact with the printer. If you don't have it then contact the manufacturer for it.

If you are working with MS-Windows on a PC then you might be able to just call ShellExecute() win32 api function.

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

all your program is doing is parsing the filename (see line 11). What you need to do is read a line from the file then call strtok() on the input buffer for that line, such as

char line[255];
while( fgets(line, sizeof(line), file)
{
    ptr = strtok(line, ","); // assume comma-deliminated csv file
    while(ptr != NULL)
    {
           // do something with this token
           //
           // now get next token
           ptr = strtok(NULL, ",");
    }
    fclose(file);
}
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster

Welcome to DaniWeb where you will find several of us old folks here and even a couple teachers.

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

you need to create two functions that do what your instructions told you to do. Then move the code you have on lines 38-44 into function A and lines 50-59 into function B. Lastly, change what you now have on line 38 to call function A, and change what you have on line 50 to call function B.

Replace the terms "function A" and "function B" with function names that have more meaning to your program.

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

lines 13, 43 and 50: C language does not require you to typecast the return value of malloc(), but c++ does.

line 27: Attempting to dereference a pointer that has never been initialized. Remove the star in front of temp should fix that. temp = *head;

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

>>here c++ program

I would never guess it from what you posted. If you are writing c++ then why are you using prinf() ?

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

Post your code because my eyes aren't good enough to see what's on your monitor.

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

Look at:
And never do that, it's a way to nowhere:
- No type check (evidently why) for variadic argument lists.
- No way to check up the end of argument list in called function

I don't have a problem with variable arguments function in limited instances where the function is only called by my program where I can guarentee argument types and end-of-argument-list is checked. For numeric arguments I always indicate end-if-list by -1 argument, or for strings by NULL argument.

If the programmer is not carefull printf() can have unintended bad consequences too (been there and done that).

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

1/3 is integer division which results in 0. Try 1.0/3.0 to get float division.

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

Its about time :) I think I told you that at least twice.

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

Almost nothing written since 1960. Singers nowdays just make noise, not music, although they have gotten a little better in the last 5 years.

what is your favorite job?

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

And your program will need to include windows.h header file.