15,300 Posted Topics

Member Avatar for majestic0110

By [b]anime[/b], do you mean animated ? If yes, the last one I watch and enjoyed was [URL="http://disney.go.com/disneyvideos/animatedfilms/ratatouille/"]Ratatouille[/URL]

Member Avatar for Kusanagi03
0
353
Member Avatar for nolife

You have check _variant_t's vt member to find out the valid type of the variant. The value of vt after Clear() is called is 0, meaning that _variant_t object does not contain any valid data. It's a very similar concept of deleting a string but not resetting the pointer to …

Member Avatar for nolife
0
695
Member Avatar for lightningfire

lines 31 and 32 are asking for keyboard input twice. Delete one of those lines Use either DirectX or OpenGL for game engines. Post game questions in the game forum.

Member Avatar for lightningfire
0
159
Member Avatar for belle carin

Welcome to DaniWeb. Ask your question(s) in the appropriate Software Development forum and I'm sure someone will be glad to answer them. Won't be me though because I know nothing (well almost nothing) about VB.

Member Avatar for belle carin
0
84
Member Avatar for amegahed3

Note: Untested and uncompiled code below. Use at your own risk. [code] FILE* fp = fopen("file.txt","r"); char line[255]; while( fgets(line, sizeof(line), fp) ) { int len = strlen(line); if( line[len-1] == '\n') { line[len-1] = 0; --len; } // make test for "= 9999999999" here if( (len > 13) && …

Member Avatar for amegahed3
0
76
Member Avatar for Weichen

Console::Read() only reads a single key from the keyboard buffer. When you type 'Y' followed by a <Enter> key there are two keys, not one, in the keyboard buffer. You have to remove the '\n' so that Console::Readline() can work properly. One way to fix that is to use Console::Readline(), …

Member Avatar for Weichen
0
430
Member Avatar for dchunt

you opened the file in text mode, which means the operating system may translate some of those binary characters. Open the file in bianry mode (ios::binary) and your program will probably work.

Member Avatar for kadams
0
136
Member Avatar for ylin333

The oldest and most common method is via [URL="http://www.easysoft.com/developer/languages/c/odbc_tutorial.html"]ODBC[/URL]. Its pretty complicated stuff. There are a few [URL="http://www.google.com/#hl=en&source=hp&q=odbc+c%2B%2B+class&aq=5&aqi=g1&aql=&oq=odbc+c%2B%2B+cla&gs_rfai=CZT97DYBJTNK3JorAM6CPoYEKAAAAqgQFT9AQ-o8&fp=a0e2566896ed0ba7"]c++ classes[/URL], use google to find them too. Another method is [URL="http://en.wikipedia.org/wiki/ActiveX_Data_Objects"]ADO[/URL], Microsoft has an ActiveX control for that.

Member Avatar for ylin333
0
235
Member Avatar for Ryan61343

line 5: wrong data type. Should be elementType, not int. move lines 3, 4 and 5 down into the if statement. No point in doing that extra work when head is a NULL pointer. line 20: at this point you need to allocate a new node to insert into the …

Member Avatar for Ancient Dragon
0
87
Member Avatar for okwy

Populate struct tm with the date, set the time to some fictious number (if you don't do that the next step will fail), then call mktime(), which will populate all the rest of struct tm and return time_t value. You will have to parse the string to extract the year, …

Member Avatar for Ancient Dragon
0
224
Member Avatar for wyssen

You must be doing something else that causes that '\n' at the end of the string. This works ok for me [code] int main() { char *argv[20] = {0}; std::string ip = "127.0.0.1"; argv[1] = (char*)ip.c_str(); std::cout << argv[1] << '\n'; std::cout << "Hello\n"; } [/code]

Member Avatar for wyssen
0
282
Member Avatar for karaoke100
Member Avatar for ironmancpp

You mean [URL="http://www.codeproject.com/KB/IP/smtppop3mailserver.aspx"]like this[/URL], but in c++ instead of C#?

Member Avatar for Ancient Dragon
0
208
Member Avatar for Anex

It is perfectly ok to use char variable as an index to an array -- in fact it is very handy thing to do at times. For example lets say you need to count the number of occurrences of each letter in a sentence. To do that just loop through …

Member Avatar for Ancient Dragon
0
9K
Member Avatar for sana_moi
Member Avatar for sana_moi
0
140
Member Avatar for ronnyrhymes

>copyPtr = originalPtr; That is just changing the pointer, not the contents of the arrays. You have to add * to each, such as [icode]*copyPtr++ = *originalPtr++;[/icode] You also have to increment both pointers. So the loop becomes [code] while(*originalPtr) { *copyPtr++ = *originalPtr++; } *copyPtr = 0; // null-terminate …

Member Avatar for ronnyrhymes
0
122
Member Avatar for pav6kor

You mean something like this? [code] int x = 123; int* pX = &x; printf("%d\n", *px); [/code]

Member Avatar for ronnyrhymes
0
97
Member Avatar for Shikhin
Member Avatar for carlamoore54
Re: NEW

Welcome to DaniWeb. Most likey no one can help you. This is an IT forum, not some sort of human language translation forum. But you might get the translation by using some online translation web site -- google for it. Don't be surprised if the translation isn't something very silly. …

Member Avatar for maceman
0
50
Member Avatar for niitb
Member Avatar for niitb
0
96
Member Avatar for omGac0W

A couple problems: 1) line 11: you have to set number to 0 so that the loop will stop 2) line 27: change data type to int because that's what palindromecheck() expects as its parameter.

Member Avatar for Ancient Dragon
0
100
Member Avatar for SeanC

You should talk to your school consoler because only he/she will know the difference at that school. All we can do is guess.

Member Avatar for Ancient Dragon
0
387
Member Avatar for new_programmer
Member Avatar for new_programmer
0
179
Member Avatar for edoscope

Well, Mr. blackrainbow, your solution isn't much better than the original. This assumes no white space in either the name or ID rows of the file. [code] Student t; while( fileread >> t.name >> t.ID >> t.grade1 >> t.grade2 >> t.grade3 >> t.grade4 ) { database.push_back(t); } [/code] If it …

Member Avatar for blackrainbowhun
0
159
Member Avatar for anu john

study [URL="http://www.google.com/search?hl=en&q=ODBC&btnG=Search"]these google links[/URL] about ODBC. There are other ways depending on which SQL server you are using but ODBC is the most portable and is supported by most, if not all, SQL servers today. ODBC, as well as other methods, are somewhat complicated and accessing in c++ is a …

Member Avatar for 0x69
0
1K
Member Avatar for LevyDee
Member Avatar for Ancient Dragon
0
65
Member Avatar for diafol
Re: Guns

Absolutely and most definately not. The first thing all dictatorships do is take away the ability of its citizens to defend themselves. And it has been demonstrated over and over again, time after time, that crime INCREASES when guns are restricted or banned. Just one of many many examples [quote] …

Member Avatar for jon.kiparsky
0
661
Member Avatar for Jacobah

There is a message loop and queue already -- its inside the MFC internals and hidden from you.

Member Avatar for Jacobah
0
68
Member Avatar for chathuD

I smell homework assignment. IDE is not really all that important -- enterprise application development can, and often is, done without IDEs. IMO the most important features of a good IDE are: [list=1] [*]Allows the programmer to organize his/her project files [*]Color codes the code's syntax for easier reading/understanding [*]Highlights …

Member Avatar for Ancient Dragon
0
103
Member Avatar for Ancient Dragon

anyone know the highest possible score when dealing one card at a time? I think I've come close with scores over 5000.

Member Avatar for Card Dufus
0
148
Member Avatar for sree_ec

The stack size you specify in the makefile for linking is only for the main thread. It does not include the other threads that the program may create during runtime. [URL="http://www.unix.com/programming/34632-how-find-out-stack-size-occupied-process.html"]Here [/URL]are other suggestions.

Member Avatar for Ancient Dragon
0
574
Member Avatar for Sismetic

Aftrer main() finishes that loop reading the file the ifstream is located at end-of-file. Therefore test() can't read the file again. In test() call fseekp() to reset the file pointr back to beginning of file

Member Avatar for Ancient Dragon
0
230
Member Avatar for garyengle

>>scanf("%c",t->wallet); Scanf() %c requires a pointer to a character, but all you are passing is a char itself. Change t->wallet like this: [icode]scanf("%c", &t->wallet);[/icode] The the same with other scanf() functions.

Member Avatar for garyengle
0
144
Member Avatar for PixelExchange

For testing out the two programs you could do them both on the same computer. For more extensive tests use two computers (or computer and laptop) you connected via LAN. I don't think you can make your server program run on someone else's computer without their permission.

Member Avatar for Aranarth
0
131
Member Avatar for jess314

This is not for someone who doesn't know a thing about C and/or C++. If you are that new then start somewere else, not with Allegro. The zip file contains a build directory in which the project files for different compilers are stored. The Microsoft VC++ 6.0, 2005 and 2008 …

Member Avatar for jess314
0
298
Member Avatar for libathos

win32 api function CopyFile() can be used with any file type. Post your code so that we can see what you did wrong. When CopyFile() returns zero value, get the error number from GetLastError(). Then call FormatMessage() to get the error message text.

Member Avatar for libathos
0
145
Member Avatar for IT cllge stdnt

Yes it will help. By itself it won't get you a job, but it will get you in the door to get an interview. Its up to you to show your stuff (knowledge and skills) during the interview.

Member Avatar for IT cllge stdnt
0
270
Member Avatar for gahhon

how is name declared? Assuming name is a character array you will want to look at each character and use isalpha() to determine whether or not the character is a-z or A-Z.

Member Avatar for gahhon
0
152
Member Avatar for scar164
Member Avatar for Andreas5

Search amazon.com for the books. Is it too early? Not if you have understood those two books and successfully coded most of the problems at the end of the chapters. In that case you will probably have little problems understanding Windows Forms.

Member Avatar for Andreas5
0
124
Member Avatar for louisdinh

computer won for me but I had to sort of force it to win. It appears to first check if it needs to block before it checks to see if it can win. Maybe you need to reverse those two checks. (I didn't look at the code, I just compiled …

Member Avatar for louisdinh
1
2K
Member Avatar for livestrong2431

The stack parameter to those two functions have to be passed by reference, not by value [icode]int nPush(int b, stack<int>& a)[/icode] Also you have to initialize the value of k before using it on line 49.

Member Avatar for livestrong2431
0
136
Member Avatar for gmunk

it has to be expanded. [code] char query[255]; sprintf(query,"SELECT %s, %s FROM table_name;",fname,lname); [/code] But even the above is wrong because %s and %s need to represent column names, not data values. It's very unlikely the table has two columns named "John" and "Doe". A more likely query might be …

Member Avatar for aryan79
0
1K
Member Avatar for ganesh_IT

I would probably use containment. Don't use the name 'time' because that symbol is already used in time.h [code] class localtime { }; class date { }; class timedate { localtime tm; date dt; }; [/code]

Member Avatar for Fbody
0
95
Member Avatar for Drakarus

You have to make them a string, such as [code] char buf[40]; int hour = 1; int minute = 25; sprintf(buf,"%02d:%02d", hour, minute); [/code] That's the easiest way to do it. It can also be done using stringstream. Or if all you want to do is display them [icode]cout << …

Member Avatar for Drakarus
0
164
Member Avatar for abhijeet kamble

[URL="http://lmgtfy.com/?q=%23pragma+startup+in+c"]pragma startup[/URL] As for the times, it will depend on the operating system.

Member Avatar for mike_2000_17
0
119
Member Avatar for tamayoclarisa

convert it to an integer before comparison [icode]if( atoi(system.stocknumber) > 7)[/icode] Your program should validate that the user entered all digits before doing that otherwise atoi() will produce meaningless results.

Member Avatar for Ancient Dragon
0
141
Member Avatar for saba17
Member Avatar for 2008macedonkon3

On today's computer there is little or no performance difference between floats and doubles. Years ago all floats had to be converted to doubles before FPU processes them. In some cases that may still be true, but no all. I understand some FPUs can handle both floats and doubles without …

Member Avatar for Kanoisa
1
2K
Member Avatar for westony

Your picture illustrates an array with 4 stars, not 3. Break them down into smaller sets of pointers which will be easier to comprehend. The code below assumes the last item in each array is a NULL pointer so that the program will know where the end of the array …

Member Avatar for kings_mitra
0
88

The End.