15,300 Posted Topics

Member Avatar for kartouss

fstream parameters require const char*, not string. So pass the c_str() method [icode]ifstream myfile1 (path1.c_str(), ios::binary)[/icode] [edit]^^^ what Narue said.[/edit]

Member Avatar for kartouss
0
81
Member Avatar for dkwantee

>>int players[1]; Why is that an array? might as well just declare it as a simple integer instead of an array of 1 element. >> if(p1color=='R' || 'r') That's incorrect. Here's the correction: [icode] if(p1color=='R' || plcolor=='r')[/icode]

Member Avatar for Ancient Dragon
0
116
Member Avatar for pad510

>>(NOte: If I remove _stdcall its working fine) Then what's the problem? Leave _stdcall out then.

Member Avatar for Ancient Dragon
0
177
Member Avatar for sudhirblgupta

what operating system? If MS-Windows you can call win32 api function CopyFile() to copy the file from one computer to the other by specifying the full path including drive letter in the filename parameter.

Member Avatar for Ancient Dragon
0
121
Member Avatar for legendarya49
Member Avatar for Ancient Dragon
0
132
Member Avatar for Nessie

what makes you think your program is working? The loop on line 21 doesn't stop when you press the <Enter> key. And if you just type in a bunch of crap you get this: [code] Please enter string for storage: lkaslkjas;lkfjaslkfjas;lkjfg;lkjglkjerpoitjergokjjgk;lkeo;ijtoijtrhoijrt;hoijrth oijtgoijegoijewgoiejgoierjgpoijergoijergoijwegpoijwergpoiwjergpoiwejg The first 81 characters of the string entered …

Member Avatar for Nessie
0
112
Member Avatar for The Dude
Member Avatar for soosai

That's a very common programming assignment and you will find a lot of help if you just learn to use google. [URL="http://www.google.com/search?hl=en&q=c+program+to+get+combinations&btnG=Google+Search"]Links here[/URL]

Member Avatar for jephthah
0
94
Member Avatar for hyperzero4

you don't declare it like that. First just declare the vector object [icode]vector <problem> problems;[/icode]. Then later on you can add classes to it [code] vector <problem> problems; problem person; for(;;) { // enter each of the attributes of the person object is not shown // add a class object …

Member Avatar for bugmenot
0
99
Member Avatar for g_loughnan

>>I don't know what to write to achieve this That's not the only thing you don't know how to write. Your program is littered with tons of errors. Don't try to write that much code without compiling it firs, and fix all the errors so that the compiler does not …

Member Avatar for g_loughnan
0
137
Member Avatar for DaveCachia

[QUOTE=DaveCachia;570683]If anyone else has suggestions as to where I should start and how I should go about doing this.. it would be more than appreciated. Group members are not helping :([/QUOTE] What's your hurry! Don't expect immediate answers to your questions, sometimes it might take a few hours depending on …

Member Avatar for vmanes
0
119
Member Avatar for drichird

I was 42 when I retired from the USAF in 1985 and began my programming career. First got an intro job for a temp agency in St Louis then a contracting company. In 1997 landed a job for a company that had a large government contract in my area -- …

Member Avatar for muta
0
154
Member Avatar for Ancient Dragon

Would it be possible to limit the searches to a specific forum, such as just the forum I happen to be viewing at the time ?

Member Avatar for zandiago
0
60
Member Avatar for buvnut

rand() never generates number in sequential order -- if it did then the numbers wouldn't be random. What you need to do is put the generated data into an array the sort the array by height. Or put the numbers in the linked list in numerical order instead of just …

Member Avatar for Ancient Dragon
0
88
Member Avatar for Waseemn

swapping character arrays can not be done with the = operator. Instead you have to call strcpy() to copy them. [code] strcpy(cExtraName,cRunner1); strcpy(cRunner1, cRunner2) strcpy(cRunner2, cExtraName); [/code] As for your first problem you will have to post all the code so that we can find the problem. If you don't …

Member Avatar for vmanes
0
172
Member Avatar for jonc

You can download the C source code for QStat from [URL="http://www.qstat.org/"]here[/URL]. All you have to do is port it to VB and you won't have to hack away at it. Or port it to C# which might be even easier to do.

Member Avatar for Kevin B.
0
95
Member Avatar for Crazycfk

>>q2: I am also having having trouble convert a int to a string and i looked it up but i am >>not sure how to use itoa or sprintf This is c++, so don't use either itoa or sprintf. Use stringstream instead [code] #include <sstream> <snip> int main() { int …

Member Avatar for Ancient Dragon
1
123
Member Avatar for chidambaram
Member Avatar for Ancient Dragon
0
34
Member Avatar for robbins88

you need to make more generous use of { and } [code=cplusplus] void blur(int src[], int rows, int cols, int dest[]) { int count; for (int i = 0; i<rows; i++) { for (int j = 0; j<cols; j++) { for (int count = 4; count <= i*cols + j; …

Member Avatar for dougy83
0
280
Member Avatar for armen_shlang

You'll have to explain a little better because I don't see the problems you report.

Member Avatar for dougy83
0
92
Member Avatar for amroto

menu items 4 and 5 are probably the most difficult and I would leave them to last. But the others aren't all that hard. Take #1 -- append text to the end of a file. The answer to that is all in how the output file is opened. [URL="http://www.cplusplus.com/reference/iostream/fstream/open.html"]Look at …

Member Avatar for amroto
0
484
Member Avatar for bhoot_jb

>>then what is the difference between both styles ?? The first is most definitely an array. The second may or may may not be an array because it could also be a pointer to a single int object. [b]function()[/b] must be made smart enough to know whether *p is a …

Member Avatar for bhoot_jb
0
119
Member Avatar for tgiboss1

See [URL="http://www.programmersheaven.com/mb/mfc_coding/189694/189694/ReadMessage.aspx"]this thread [/URL]and [URL="http://support.microsoft.com/default.aspx?scid=kb;en-us;190351"]this M$ link[/URL] also [URL="http://www.codeproject.com/KB/debug/mfcconsole.aspx"]here[/URL]

Member Avatar for tgiboss1
0
805
Member Avatar for Nemoticchigga

>>Any Idea why this section of code would give me these linker errors Yes. You have to add Use Ws2_32.lib as described in the [b]Requirements[/b] section [URL="http://msdn2.microsoft.com/en-us/library/ms742213.aspx"]here[/URL]

Member Avatar for Nemoticchigga
0
91
Member Avatar for sudhirblgupta

>>How i can solve it? By adding the library to the link statement. How to do that depends on the compiler you are using and possibly the makefile.

Member Avatar for Ancient Dragon
0
59
Member Avatar for technogeek_42

>>Viruses may trash your hard disk Oh yes -- what was a [b]feature[/b] built into MS-DOS 6.X and Windows 95. I can't count the number of times I had to reformat the hard drive and reinstall everything from scratch. I have not had that problem since Windows 2000.

Member Avatar for Jx_Man
0
268
Member Avatar for noraantonia
Member Avatar for noraantonia
0
128
Member Avatar for kv79

try [URL="http://www.google.com/search?hl=en&q=shareware&btnG=Google+Search"]these shareware sites.[/URL]

Member Avatar for nanosani
0
100
Member Avatar for Traicey

You need a game engine such as DirectX SDK (free for the downloading from Microsoft). But be prepared for some very heavy-duty c and c++ coding. The SDK that you download includes quite a few example program to illustrate how to use the SDK. Also check out the [URL="http://www.daniweb.com/forums/forum71.html"]Game Development …

Member Avatar for Traicey
0
157
Member Avatar for sjgriffiths

You are not validating the return value of strtok(). It returns NULL if its at the end of the string when you call strtok() with a NULL first parameter (or some other error occurred). It would be more prudent to code it like this: [code] char* ptr; while(fgets(b2b_rates_address,1000,in_fp) != NULL …

Member Avatar for Narue
0
176
Member Avatar for cjw3131

int main() is declared wrong. There are only two acceptable ways to declare it [code] int main() { } int main(int argc, char* argv[]) { } [/code] >>int term1* You don't declare a pointer like that -- you have the asterisk in the wrong place: [icode]int* term;[/icode]

Member Avatar for Ancient Dragon
0
93
Member Avatar for sheree

[b]this[/b] is a hidden parameter that is passed to every [b]non-static[/b] method of a c++ class. It is used to point to a specific instance of a class and all its data object. In your specdific problem FindParent() is called from a specif node in the list, and the [b]this[/b] …

Member Avatar for sheree
0
5K
Member Avatar for niitian

getch() is a non-standard function by Borland therefore not all compilers support it.

Member Avatar for Ancient Dragon
0
64
Member Avatar for Waseemn

>> would like to put the last two lines in a While Loop to prevent the user from going over >>the 20 character limit, When you use getline() that isn't necessary because getline() will no accept more than iLength number of characters including the string null terminator.

Member Avatar for Ancient Dragon
0
95
Member Avatar for Nemes

probably memory has been corrupted before executing that line. The most common cause is buffer overruns -- writing beyond the end of a buffer or an array.

Member Avatar for Diode
0
2K
Member Avatar for KasperFP

[URL="http://www.codeproject.com/KB/stl/stdsort.aspx"]Tutorial and example here[/URL]

Member Avatar for Ancient Dragon
0
97
Member Avatar for anbuninja

>>if (Y = 'Y') Sorry, Rajith, but that's not how to do it. You need the == operator, not the assignment operator.

Member Avatar for Sky Diploma
0
113
Member Avatar for look@me

[QUOTE=look@me;566840]i have a small problem in my ass and i dont know how to solve it [/quote] That's not very descriptive of the problem. You need to be a bit more specific about what you can not do or understand ?

Member Avatar for VernonDozier
0
108
Member Avatar for Ancient Dragon

Would you please explain what this is for? I presume its a list of links to people's web sites. Why would you want that? Is it another place for people to advertise their web sites?

Member Avatar for thunderstorm98
0
66
Member Avatar for javagurlush

>>Visit this site, it really fits well to my needs: Ok, so it won't accept the word "bloody" but it will accept "f***k". Some crappy filter that is :) bloody is not a naughty word but the other is.

Member Avatar for peter_budo
0
317
Member Avatar for Ben10
Member Avatar for cedtech23

[QUOTE=williamhemswort;566451]Make a 2D array. char fname[100][50]; fname[0] = "First Name1"; fname[1] = "First Name2"; ... and so on[/QUOTE] you have to use strcpy() to set those char arrays [code] strcpy( fname[0], "First Name1"); strcpy( fname[1], "First Name2"); [/code]

Member Avatar for Ancient Dragon
0
173
Member Avatar for octavia

line 1: its either <cstdio> or <stdio.h> line 13: [URL="http://www.gidnetwork.com/b-66.html"]void main[/URL] -- read the link lines 28, 31 and 34: [URL="http://www.gidnetwork.com/b-56.html"]gets()[/URL] -- read link >>But i am not able to handle the debugging in VC++. >>How should i do? Read some of [URL="http://www.google.com/search?hl=en&q=vc%2B%2B+debugger+tutorial"]these links[/URL]

Member Avatar for Ancient Dragon
0
328
Member Avatar for demroth

>>line 4: test_string.length Length is a function call, not a data object. [icode]test_string.length()[/icode]

Member Avatar for Rajith Cherian
0
120
Member Avatar for charlez40

Your program never opens the input file. Where's the infile.open() statement? The while statement in ReadAllOfFile() is incorrect. The eof() doesn't work that way. Here is how it should be coded. You should change readFile() to return the reference to ifstream instead of the structure and pass the structure by …

Member Avatar for Rajith Cherian
0
113
Member Avatar for Diode

The libraries depends on the operating system which is why neither c nor c++ supports TCP/IP and networks directly. For MS-Windows just use win32 api functions found in winsock.h, which is pretty compatible with Berkley Sockets standard. I don't know if there is a platform-independent socket library, but I suppose …

Member Avatar for Diode
0
113
Member Avatar for adnanius

>>What happens to it's value once an element is deleted ? The iterator is invalidated and you have to start it all over again. Example here: The program will crash after the erase() is executed unless the break statement is there to stop the loop. [code] #include <vector> #include <iostream> …

Member Avatar for adnanius
0
301
Member Avatar for hockeyplayer051

Don't get overwhelmed by the complexity of the problem, but break it down into smaller units that you can deal with. For example, first write a program that just has a menu inside a loop. The menu should ask to either quit the program or find another name. Get that …

Member Avatar for Ancient Dragon
0
96
Member Avatar for Lukezzz

>>Does this take up any RAM memory just because I have declared this number of >> elements Yes -- it will take up (1000000 * sizeof(string)) + sizeof(vector) before any of the strings have been initialized with anything.

Member Avatar for Lukezzz
0
155
Member Avatar for davye_l

Did you look on that line in your program and see what variable or symble it thinks is undefined ?

Member Avatar for Ancient Dragon
0
377

The End.