15,300 Posted Topics

Member Avatar for suneel kar
Re: help

do you mean concatenate two strings? First make sure the destination buffer is large enough to hold both strings. Next make sure the destination string is not a string literal because string literals can't be changed. Call strlen() to find the end of the destination string. Then create a for …

Member Avatar for Ancient Dragon
0
88
Member Avatar for mooncry

google for [URL="http://www.google.com/search?hl=en&q=ascii+chart&btnG=Search"]ASCII Chart[/URL] -- there are millions of them on the net. Then in C++ code \xHH is hex code, like this [code] cout << "Hello my name is \x4d\x65" << endl; [/code]

Member Avatar for vijayan121
0
134
Member Avatar for ashok_kumar786

[QUOTE=ashok_kumar786;413211]Hello Friends, I have got a program for Checking the number that is it Armstrong or not. and to genrate a list of armstrong no. below 1000. The program is in C++.[/QUOTE] Great work! So you copied it from [URL="http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/chap04/arms.html"]here[/URL] then ported it to c++?

Member Avatar for Ancient Dragon
0
93
Member Avatar for jaepi

use CFile class in combination with CArchive. But for normal c++ file i/o stuff the ofstream class is a lot easier to use.

Member Avatar for Ancient Dragon
0
30
Member Avatar for anand_daksh_999

>>iostream.h that is for c++, not c. All the other headers are in <install directory>\include folder. In the IDE look at Options --> Directories and make sure it has the correct path.

Member Avatar for Ancient Dragon
0
83
Member Avatar for RohitSahni

line 2: unless you are using a very old compiler such as the original Turbo c++ you should be using header files without the .h extension because there have been some changes. You should have named your derived string something other than String.h because that is already the name of …

Member Avatar for Ancient Dragon
0
140
Member Avatar for Jupiter247

[QUOTE=VIDHYAPREM;297622]hai , just i am new member. i dn't know the forum rules.we should not answer like this or it had any mistake.please tell me.[/QUOTE] forum rules do not prohibit you from giving complete solutions, just discourages it. But you should probably take a few minutes to review the rules …

Member Avatar for Shahnaz Sheikh
0
849
Member Avatar for gopi kannan

[QUOTE=draftjoker;411740]yea, that entire paragraph was unreadable[/QUOTE] I disagree -- I may be as ancient as the hills by most people's standards here but even I was able to read/understand the post. "...tell me whatz dis" is the only sentence that I could see that might cause some problems (from non-English …

Member Avatar for WaltP
0
217
Member Avatar for asilter

some questions: [b]Function CreateHVFESection0().[/b] 1. Why is vpSec0 a parameter? It could just as easily be declared locally in the function since it is never used for anything. 2. Why do you bother to malloc nbytes since sizeof(size_t) is only 4 bytes in 32-bit compilers ? Just declare it normally …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for Fromethius

Your description sounds like a flag may not be getting set correctly. does your program contain code that is executed when it is minimizes and maximized ? Does the same problem occur with other DirectX programs written by either yourself of someone else (attempting to isolate the problem to either …

Member Avatar for FireNet
0
157
Member Avatar for EnderX

Looks like COBOL. Don't know of any other programming languages that use that key word, but then I don't know them all either. If you have a COBOL program then it should be quite obvious from other syntex -- COBOL programs have a very distinctive grammer.

Member Avatar for jbennet
0
165
Member Avatar for youngstorm

[QUOTE=Tight_Coder_Ex;412002]You propbably want to use [inlinecode]int 21H What you are actually doing is calling interrupt 15H (21) instead of 21H.[/inlinecode] in line 10. [/quote] Good catch. I missed that too. :) [QUOTE=Tight_Coder_Ex;412002] I can't verify that AX = 4C00 is correct because my book is for DOS 2.1[/QUOTE] You could …

Member Avatar for youngstorm
0
107
Member Avatar for flavour_of_bru

depends on the operating system. MS-Windows you can use FindFirstFile() and FindNextFile(). *nix you can use opendir() and readdir(). Or boost libraries have a functions that are portable between operating systems. You can find c++ examples of both in the [URL="http://www.daniweb.com/code/coder46588.html"]c++ code snippets here at DaniWeb[/URL].

Member Avatar for Ancient Dragon
0
113
Member Avatar for zandiago

just write a little prgram that generates 1000 numbers between 10 and 100 using rand() % 100 + 10 to generate the numbers and save them to a file. Then you can write the other program as your teacher instructed.

Member Avatar for Lerner
0
417
Member Avatar for ananthxp

do you mean computer A controling a USB device on computers B, C, D, ... which are all connected on the same network ? The only way I can imagine that happening is if computer A sends instructions via sockets (or some other way) to a program on the other …

Member Avatar for ananthxp
0
86
Member Avatar for Fromethius

>>Is there an equivalent to SendKeys.Send in C++? No. C++ language knows nothing (other than what it inherited from C language in stdio.h) about the keyboard because its os specific. You have to use os-specific api function calls to send them one character at a time like jamthwee suggested.

Member Avatar for rdwofrdw
0
622
Member Avatar for JRM

Unless you are writing c++ templates don't put executable class implementation code in *.h files -- it goes in *.cpp file.

Member Avatar for JRM
0
99
Member Avatar for eyedea2011

[QUOTE=eyedea2011;410299]Can someone help im suppose to write a family of overloaded functions called equal(), which take two arguments of the same type, returning 1 if the arguments are equal, and 0 otherwise. This is what i have that refuses to compile.[/quote] What question(s) do you have about the code you …

Member Avatar for JRM
0
125
Member Avatar for hungry_for_info

[QUOTE=goldpanini;411153]I think I have the same problem This thing is driving me crazy. Here's the Hijackthis log. Anyway, I'm new to this and hope someone can help as my antivirus is not removing this problem. Thanks in advance. [/quote] Did you trie Crunchie's suggestions ?

Member Avatar for crunchie
0
364
Member Avatar for shaist
Member Avatar for tformed

>> for (j=1;j&lt;=n;j++) I think you misquoted the code (lines 19 and 20) because that is just so much nonsense. Proofread the code you have to make sure you did not make typing errors. If its really like that in the book then go to the publishers web site to …

Member Avatar for Ancient Dragon
0
266
Member Avatar for Salem

>>And why would they when there are plenty of lap-dogs to clean up after them :angry: I resent being called a "lap dog" >>Unless you put some serious inconvenience in the way, they're just not going to learn Learn what? how to use code tags? Yes, I've given out a …

Member Avatar for MidiMagic
0
338
Member Avatar for kpillsb39

Its pretty simple, really. Just create an array and read each line into its own element of the array. You will need a loop to read the file until eof() and an int counter to keep track of the line number read so that it will know which row to …

Member Avatar for Ancient Dragon
0
78
Member Avatar for sk8ndestroy14

[quote=Narue;364336]>Because this thread was made for anything and everything. That's why. Then I guess it's pointless to have a chat room if everyone refuses to use it.[/quote] Maybe because nobody knows its there -- this is the first I heard of it. I probably wouldn't use it anyway even if …

Member Avatar for ndeniche
2
2K
Member Avatar for kogorman

sort() does in-memory sort -- what you need is a file sort program. Or better yet write a file sort-merge function and add it to your program to preprocess the file. That way you can do away with that fork pipe and exec function calls. you might check the boost …

Member Avatar for vijayan121
0
218
Member Avatar for johnray31

>>recursive implementation of depth first search [URL="http://en.wikipedia.org/wiki/Depth-first_search"]read this[/URL] >> is it possible to code any problem with recursion without using global variable yes, pass them as a function parameter

Member Avatar for Hamrick
0
110
Member Avatar for jaepi

tm struct does not contain milliseconds. But if you don't care about milliseconds then tm will work in all platforms and compilers because it is in standard C library.

Member Avatar for Ancient Dragon
0
120
Member Avatar for eyedea2011

Are you blind, senile, have demeinita, or maybe older than I am? I have already told you TWICE what the problem is with that second program. And this is the third time you have posted that same code. Now, go back and re-read the responses to your previous threads. I'm …

Member Avatar for eyedea2011
-1
145
Member Avatar for zite.1

[URL="http://www.winprog.org/tutorial/"]Here[/URL] is a popular tutorial. win32 api is C, not C++. You can create c++ programs that call win32 api but it isn't necessary. MFC and wxWidgets are two c++ gui libraries. wxWidgets is free and works with most compilers and operating systems. MFC is not free and restricted to …

Member Avatar for Arctic wolf
0
801
Member Avatar for Stefano Mtangoo

go to [url]www.amazon.com[/url] and do search for those subjects -- entire books have been written about them so its unlikely we can do them justice here.

Member Avatar for Stefano Mtangoo
0
78
Member Avatar for eyedea2011

>>I'm trying to write 2 codes in C++, but i'm having major problems what exactly are the [b][i]major problems[/i][/b] ? >>This is what i have so far: That's nice. Now what do you want us to do? Or what question(s) do you have?

Member Avatar for Ancient Dragon
0
395
Member Avatar for complete

Every resource item must have a unique ID number, both the resource files in your project and resource files in other DLLs. You can use [URL="http://msdn2.microsoft.com/en-us/library/ms647990.aspx"]LoadMenu[/URL]() to load a menu resource that is not normally part of the project. Also read the links [URL="http://msdn2.microsoft.com/en-us/library/ms647558.aspx"]here[/URL] for how to create a shortcut …

Member Avatar for complete
0
1K
Member Avatar for mauro21pl

which line ? On line 18 the value of ptr2 is random because it is uninitialized. Line 22 is also random because it is deferencing the integer located at the address of the address, which also has not been initialized and could possibly crash the program. I don't know how …

Member Avatar for Ancient Dragon
0
99
Member Avatar for mauro21pl

>>p==&i; That is a logical expression, not an assignment. Its asking if the address stored in pointer p is the same as the address of i.

Member Avatar for Bench
0
108
Member Avatar for ivatanako

>>why is it 32 Look at any standard [URL="http://images.google.com/imgres?imgurl=http://www.ascii.ws/images/ascii-chart.gif&imgrefurl=http://www.ascii.ws/ascii-chart.html&h=488&w=715&sz=28&tbnid=bx0wgtxpR0THsM:&tbnh=96&tbnw=140&prev=/images%3Fq%3Dascii%2Bchart%26um%3D1&start=1&sa=X&oi=images&ct=image&cd=1"]ASCII chart[/URL] and you will see that the letter 'A' = 65 and 'a' = 97. 32 is the difference between them. Subtract 32 from any lower-case letter and you will get the upper-case letter.

Member Avatar for Ancient Dragon
0
4K
Member Avatar for Stefano Mtangoo

See [URL="http://www.freevbcode.com/ShowCode.asp?ID=3402"]this article[/URL] And [URL="http://www.google.com/search?hl=en&q=how+to+call+a+dll+from+vb"]here[/URL] are some google links you might also want to read. Looks like some of them have example code.

Member Avatar for Ancient Dragon
0
101
Member Avatar for komathana

why don't you just download the free DICOM viewer from[URL="http://medical.nema.org/"] here[/URL]? There's also a discussion group where you can ask them specific questions.

Member Avatar for Ancient Dragon
0
145
Member Avatar for eyedea2011

In the second program you should really use islower() macro to check if the character is lower-case. Then use toupper() to convert from lower-case to upper-case, like this: [code] if( islower(str[i])) str[i] = toupper(str[i]); [/code] Otherwise, that program works ok for me. :)

Member Avatar for Salem
0
254
Member Avatar for mauro21pl

initialize the arrays like this: [code] char name1[ arraySize ] = "Kenneth"; char name2[7] = "Clifton"; char name3[] = "Suzanne"; char name4[10] = "Elizabeth"; [/code] Note that you might get buffer overflow errors -- I'll leave that up to you to fix.

Member Avatar for Ancient Dragon
0
102
Member Avatar for quintoncoert

Some compilers will even let you declare main as returning a pointer! (VC++ 6.0 for example) [code] char* main() { char* ptr; return ptr; } [/code] But since pointers are really integers the program will actually return the integer value of that pointer. Meaningless -- absolutely. But I've seen someone …

Member Avatar for Salem
0
619
Member Avatar for Gorden

Welcome to DaniWeb Gorden. >>Where can i learn how to program depends on the language you want to start learning. Look in the Software Development boards and you will find lots of hints and links in the [b]Read Me[/b] posts at the top of each board.

Member Avatar for happygeek
0
43
Member Avatar for harshbhatt88
Member Avatar for narendharg

use one star for each dimension, like this: [inlinecode]int ***a;[/inlinecode] Now, in C programs, call malloc() to allocate each dimension. This will require two loops for the second and third dimensions.

Member Avatar for Ancient Dragon
0
62
Member Avatar for Firestone

[QUOTE=TkTkorrovi;407998]int space [] is in effect the same as int *space, you can use one instead of another.[/QUOTE] Sorry, but the two are not interchangeable. [b]int space [] [/b] causes illegal syntax error message (VC++ 2005 Express compiler.). Unless that is something new in C99 standards, which very few compilers …

Member Avatar for narendharg
0
122
Member Avatar for Duki

Have fun and study hard. Will be expecting a report of the fun things you did during your vacation. :)

Member Avatar for Ancient Dragon
2
54
Member Avatar for cheongsiwei

>>i need a detail explanation how the program work I assum then that you did not write that code? If you had then you would know how it works. What part(s) do you need help with?

Member Avatar for JRM
0
210
Member Avatar for tahnan

>> any one can help me with code pleas Yes, start here [code] int main() { // put your code here } [/code]

Member Avatar for Salem
0
130
Member Avatar for The Dude

[QUOTE=The Dude;234076][url=http://tinyurl.com/fxbs3]PUT THE KEY IN??[/url] I did it 6 times then it got too hard!![/QUOTE] 4 times -- then I passed out because I thought I was drunk;)

Member Avatar for hamada_1990
0
83
Member Avatar for ananda6359

QT GUI library is also portable between many (but not all) operating systems. As for compilers -- you will need one for each OS that you want to support. There is no one compiler that will cross-compile for all of them.

Member Avatar for TkTkorrovi
0
125
Member Avatar for nabilchampion

>> why the pointer value is allocated only 4 Bytes Not necessarily -- depends on the operating system and the compiler. In the days of 16-bit MS-DOS pointers were 2 bytes. On 64-bit MS-Windows pointers are 8 bytes. The maximum number of nodes in a linked list would be limited …

Member Avatar for Ancient Dragon
0
612

The End.