15,300 Posted Topics

Member Avatar for carolraydon

[QUOTE=gazaa;232665]Americans tend to pronounce is as "r - out - er", the same way as they pronounce route "r - out" Brits and a few other nationalities tend to pronounce is as "rooter" as we pronounce "route" as root. Simple, eh?[/QUOTE] Brits speak funny anyway. Especially humerous is the way …

Member Avatar for hbk619
0
388
Member Avatar for Yoshidex

1. don't use the version of fstream and iostream that have .h extension -- they are depreciated (obsolete) and were replaced by versions without extension. But if you are using an ancient compiler such as the original Turbo C++ you may have no other choice. 2. Don't use global variables …

Member Avatar for Yoshidex
0
100
Member Avatar for nottoshabi

>>I'm getting this error from this code what line number contains the error ? >> do you guys also work in multiple files? Yes, my projects at work consist of several hundred files where the implementation code and header file of each c++ class are contained in their own files. …

Member Avatar for Ancient Dragon
0
160
Member Avatar for revenge2

>>what the int main(); thing is about all functions have a return type such as int, char*, double, etc. main() is a special kind of function and is the only function required by the C and C++ standards, and it is required to return an integer back to the operating …

Member Avatar for jbennet
0
165
Member Avatar for winbatch

[QUOTE=winbatch;344956][URL="http://www.daniweb.com/techtalkforums/member134320.html"]vijayan121[/URL], I don't think ifstream works for files over 2GB, which mine is. (7GB)[/QUOTE] If this is on an MS-Windows machine, them you may have to use win32 api file i/o directly on that large a file. See CreateFile() to open the file, and ReadFile() to read its contents. All …

Member Avatar for vijayan121
0
362
Member Avatar for rapperhuj

>> strncpy(who[i],huj,300); This line is probably causing the problem. each element of who can only contain 100 characters and that line is copying up to 300 characters into it. Won't fit.

Member Avatar for Sturm
0
81
Member Avatar for civil1

>>Extract the lower 4 digits of the result produced by step 2. The easy way is to convert the number to a string then only use the last 4 digits. [code] int num = 12347; char buf[10]; sprintf(buf,"%d",num); int seed = atoi( &buf[1] ); [/code]

Member Avatar for Ancient Dragon
0
248
Member Avatar for avi_new

my guess is that you forgot to include one or more header files. You should post the line(s) the compiler is complaining about.

Member Avatar for Ancient Dragon
0
194
Member Avatar for squinx22

probably are no such tutorials, but you can search [URL="http://www.symbian.com/symbianos/index.html"]their web site[/URL].

Member Avatar for vijayan121
0
99
Member Avatar for Dani
Member Avatar for John A
0
724
Member Avatar for complete

See the [URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxstructures/openfilename.asp"]OPENFILENAME[/URL] structure and GetOpenFileName() function They already have the options you want. And [URL="http://www.codeproject.com/listctrl/drivepickerlist.asp"]here[/URL] is a drive picker MFC class. Download the source code for this project and it will show you how to get the list of drive letters that are available on the computer.

Member Avatar for Ancient Dragon
0
103
Member Avatar for The Dude
Member Avatar for jerryseinfeld

just put the char array variable name inside atof() [code=c] char num[] = "99.0"; float n = atof(num); [/code]

Member Avatar for thekashyap
0
81
Member Avatar for amin0101

I think he wants to duel boot xp and vista. I didn't have any problems doing that but I had xp on drive C and installed vista on drive D (two physically different hard drives).

Member Avatar for jbennet
0
62
Member Avatar for CRD

MSDN will normally tell you what header files and libraries are need for a given function. goto [url]www.microsoft.com[/url] and search for the function name.

Member Avatar for Mpiangu
0
103
Member Avatar for The Dude

600 non-M$ products seems pretty good for an os that has only been officially released for a couple months.

Member Avatar for Ancient Dragon
0
85
Member Avatar for nottoshabi

>>Also I dont know how to switch the percantage How would you do this with pencil and paper. If you buy a pencil for $1.00 and the taxes are 6 percent what it the total price? Hint: 1.00 plue 1.00 * 0.06. The same in your problem. If you enter …

Member Avatar for Ancient Dragon
0
324
Member Avatar for Osama Mehtab

[URL="http://www.daniweb.com/code/coder46588.html"]Here[/URL] are two more examples. There are others in Code Snipets board too.

Member Avatar for Ancient Dragon
0
97
Member Avatar for ck1212

post the code for what you know how to code and ask questions. We'll be glad to help, but we don't write it for you.

Member Avatar for rowly
0
161
Member Avatar for ahad

something is probably corrupting the memory pool some place else in your program and that's a difficult problem to find. If you have a large progrm I would start by commenting out large blocks of code until the problem goes away. That at least narrows down the search.

Member Avatar for Ancient Dragon
0
126
Member Avatar for tygerberg

>>I need help finding a gui library for c/c++ It's called the win32 api functions and is supplied with all Microsoft compilers as well as most other compilers that target the MS-Windows operating system. There are about 100 or so libraries included in it. Here is a[URL="http://www.winprog.org/tutorial/"] popular tutorial[/URL] to …

Member Avatar for Ancient Dragon
0
110
Member Avatar for sirkraven

you declare a 2d array of strings like this [code] const int ROWS = 255; const int CHARS_PER_ROW 20 char array[ROWS][CHARS_PER_ROW]; [/code] then it looks like this [code] char get(char array[ROWS][CHARS_PER_ROW]) { ifstream fin("input.txt"); if( fin.is_open()) { int row = 0; while( row < ROWS && fin >> array[row++] ) …

Member Avatar for Ancient Dragon
0
106
Member Avatar for jan1024188

depends on the operating system. MS-Windows uses boot.ini in the root directory.

Member Avatar for jan1024188
0
87
Member Avatar for sap.hit21

if that first loop is trying to count the number of words in the file, it won't work because words can be separated by one [b]or more[/b] spaces or tabs. You don't need to count the number of words anyway. just change the second loop to read until fscanf() returns …

Member Avatar for sap.hit21
0
93
Member Avatar for pc0019

If you don't want it to exit then what do you want it to do ? you can create a loop as below, but the problem with this is that there is no way to quit the program when you want it to. [code=c] int main(void) { while(1) { printf("hello, …

Member Avatar for pc0019
0
131
Member Avatar for Brent.tc

[URL="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/getclientrect.asp"]GetClientRect()[/URL] returns a RECT object with the coordinated, then simple subtraction will give you height and width.

Member Avatar for Ancient Dragon
0
115
Member Avatar for rowly

not buffer overflow -- you are not checking that strpbrk() returns a NULL pointer, which it can if the string does not contains the characters. pch is a 2d array of pointers, so if strpbrk() returns NULL that printf will fail. The format specification in printf() is incorrect too -- …

Member Avatar for Ancient Dragon
0
167
Member Avatar for mrjoli021

You failed to say what the problem is, but if you want to read one column at a time then using the extraction operator like that won't work right with csv files because columna may, or may not, be separated by white space (spaces and/or tabs). The csv files I've …

Member Avatar for mrjoli021
0
92
Member Avatar for CRD

what are the error(s) your compiler gives you ? A quick once-over looks like braces are missing from lines 26 and 38, and remove the semicolon on line 38.

Member Avatar for CRD
0
440
Member Avatar for nick048

check the client to see if it is sending the '\n' character. maybe it just terminates and doesn't send it. Also, your server program should check for buffer overflow before adding a new character. Terminate the loop if the buffer fills up.

Member Avatar for Ancient Dragon
0
80
Member Avatar for Ancient Dragon
Member Avatar for happygeek
0
81
Member Avatar for nanodano

Microsoft MFC has a c++ socket classes, but I hear it isn't very well liked. You might check boost libraries, it probably has something.

Member Avatar for vijayan121
0
188
Member Avatar for viraltaj

[QUOTE=viraltaj;341532]Yes the url was removed by the moderators.. I dont know why but may be the policies of dani restricts this. Anyways.. I came to this forum to learn C++ in depth. Yes I know a lot in it but I think its stil not enough. The Taj operating system …

Member Avatar for jan1024188
0
160
Member Avatar for jerryseinfeld

Read about the printf format string -- you can specify the field width for strings and whether they are left or right aligned. [code=c] int main() { printf("%20s\n", "Hello"); printf("%20s\n", "Hello World"); return 0; } [/code] That will print the word "Hello" in a field that is 20 characters wide …

Member Avatar for jerryseinfeld
0
125
Member Avatar for mcklein_tunde

[QUOTE=mcklein_tunde;341874]please how can i use bottons in C?[/QUOTE] what operating system ? what compiler ? what GUI library ? There are hundreds of ways to do it depending on the answers to those questions. But in no case can you do it in text-mode window like the MS-DOS command prompt …

Member Avatar for Ancient Dragon
0
99
Member Avatar for sowmya nair

Aia is absolutely and positively correct. If we write the program for you then (1) we will not get the grade, you will and (2) you will learn nothing.

Member Avatar for jimmymerchant
0
137
Member Avatar for l-o-s-t

how was it initialized and allocated (new or malloc() ? Is list or str NULL pointers ? Hard to say what the problem is without more code.

Member Avatar for l-o-s-t
0
130
Member Avatar for darrglud
Member Avatar for Osama Mehtab
Member Avatar for WaltP
0
83
Member Avatar for best

>>could you help me Yes, but you will have to post your code first because I can't see your monitor.

Member Avatar for Aia
0
86
Member Avatar for ithelp

OMG vijay where did you learn programming :eek: The code you posted still contains buffer overflow. >>most compilers will allocate more memory than seems is necessary for data compiler-specific behavior and something you must never ever count on. talk about taking advantage of undefined behavior :eek:

Member Avatar for vijayan121
0
114
Member Avatar for mrjoli021

you have to use one of the convertion functions. Example:. [code] char val[] = "123"; int n = atoi(val); [/code]

Member Avatar for iamthwee
0
68
Member Avatar for LieAfterLie

The new line in the text file is operating-system dependent. *nix uses '\n', MAC uses '\r', and MS-DOS/MS-Windows uses two characters "\r\n". Which is why text files that are transferred between operating systems are often run through a translator to convert from one format to another.

Member Avatar for John A
0
119
Member Avatar for emr

[QUOTE=Lardmeister;340429]You cannot use C to solve this problem. The highest integer value it can use is: unsigned long (32 bits) goes from 0 to 4,294,967,295 max. There are other languages that can handle very large integers easily.[/QUOTE] I think most compilers support 64-bit integers nowdays (long long or __int64) [edit] …

Member Avatar for Aia
0
194
Member Avatar for Aia

[QUOTE=Aia;340621]If you would have to write your own implementation of the function [COLOR=Blue]getchar()[/COLOR] in C; how would you do it?.[/QUOTE] It would have to be compiler and os specific which is why the C standards did not dictate how the function is to be implemented. You could use non-standard functions …

Member Avatar for vijayan121
0
487
Member Avatar for jan1024188

Vista and XP have different versions of DirectX so maybe that's the problem. You could try comiling on XP and see if it will run in Vista. There are a lot of programs that run in XP but not in Vista, and probably vice versa.

Member Avatar for vijayan121
0
301
Member Avatar for maverick786

All the above. If you are new to c++ then you are not ready to tackle that project -- companies have spent years of manhours on that sort of project and those programmers are highly experienced people. database programs do not bring the entire files into memory because the files …

Member Avatar for maverick786
0
214
Member Avatar for nottoshabi
Member Avatar for kohkohkoh

I just use regsvr32.exe program in a command prompt window to register a DLL -- no difference between versions of MS-Windows.

Member Avatar for kohkohkoh
0
147
Member Avatar for Tales

TCHAR is a macro that is defined to be char* if UNICODE is not defined, or wchar_t if UNICODE is defined. If you want to convert from char* to wchar_t* regardless of UNICODE definition then you can not use the TCHAR macro. one data type can not be converted to …

Member Avatar for Ancient Dragon
0
113

The End.