Beginners - June 2010 (Page 19)

Can someone explain this code to me? (multiset / string)
 
I was trying to code out a simple problem earlier today (Take a string that is a word, take each letter from the word, and 'count' the character in it). I was ...
[5 replies] Last: 1) Yes. 2) ::const_iterator is just there because you aren't modify... (by firedraco)
Can't find the error.
 
Can anyone please tell what is wrong in the following code. The Compiler points to the 33rd line and opens up another file. I am trying to compute the distance ...
[1 reply] : Perhaps a name conflict with std::distance (which might be included in... (by moorecm)
Any performance difference between +1 and +100000
 
Will there be any computer executive efficiency difference between adding a small number and a big number?
[4 replies] Last: Some CPUs can be faster when adding small numbers because there is ef... (by Athar)
Anyone want to look over my Tic-Tac-Toe game for improvements?
 
I made this last semester for my intro to C++ class. It works great and I got a good grade, but I want to make improvements to it. I really would like to add cl...
[2 replies] Last: That's way beyond OP's level of expertise given the original request. ... (by jsmith)
by bman
Ping program
 
I am looking for program which can send PING command by set intervals. It is desirable that program can ping devices in quantity simultaneously.
[2 replies] Last: May be this ping utility will be good for you. www.pingassist.com (by arterium)
by Faysal
Find and replace text in a text file
 
can anyone help writing the code to find and replce text in a text file, the path will be included in the code, PLz help..!!!
[6 replies] Last: http://www.daniweb.com/forums/post459319.html#post459319 (by mcleano)
how to delete the duplicate in the text file??
 
hello everyone, hope all of u are fine.. i have a problem in my work. i have a data in a .txt file format. the data is looks like below : 4 5 4 4 1 6...
[10 replies] Last: elo guys, i have made some adjustment to my previous code...and it ... (by sitikhadijahali)
How to limit decimal numbers in a float/double?
 
Well, title says it all. And cout.precision() works for the whole number, not just the decimals!
[2 replies] Last: So, if I'm reading this correctly, what you mean is that you want to l... (by jrohde)
by b52
Experimenting with function example
 
I'm just wondering if the int variable z is required or arbitrary. If it is preferable to my alternative I would appreciate knowing why. And perhaps when and wh...
[4 replies] Last: I'm not quite sure what you mean by the "Data" area of memory; perhaps... (by jrohde)
by human
Addition inside loop.
 
Hey guys,I need someone to inform me what I'm doing wrong. I'm trying to add inputted test scores inside of a loop to get an average. My problem is, the program...
[2 replies] Last: Ahhh, count=count+1... Thanks for catching that, that worked! I apprec... (by human)
Parsing a text file?
 
I'm trying to learn how to parse a text file, ideally I want to find and change just the numerical values and output the file with the same formatting. Using...
[1 reply] : If you use getline, you can read each character one at a time, determi... (by closed account Lv0f92yv)
Using char* with sprintf
 
Hi everyone, I am trying to pass a dynamic string into sprintf, so I don't have to use a fixed char array, like this: char * q; sprintf(q,"This is m...
[6 replies] Last: stringstream query; query << "Delete from Contacts where id = '" <... (by moorecm)
by fafner
Loading custom data from file
 
I've been trying to get my head around file management lately, and I've almost got it, I think. I've written a test program in which the user creates an objec...
[3 replies] Last: Great, thanks! Sorry for double post btw (by fafner)
SFML Startup Trouble
 
I know that many of you use SFML so I figured you may not the solution to my problem. I've placed the all of the .dll's in the root folder of my project, put th...
[2 replies] Last: Well, every time I try to access the site in any way it says that the ... (by MottMan)
It reads If but skips Else
 
So i made a program where users have to vote for things. Everything works fine , except when you enter another number then 1,2,3 or 4. It just skips else says a...
[5 replies] Last: (PS: do you think I should post it in articles? Nope. The inform... (by moorecm)
Begginer question about #include <string>
 
If <string> provides the C++ standard string classes and templates, why is it unnecessary to include in the header of the source code? ..or is it? Just like ...
[12 replies] Last: <string> is deprecated... use <cstring> string != string.h You... (by QWERTYman)
using namespace std; vs. std::
 
I noticed that there are many codes that contain std:: , so why not use using namespace std; ?I think its easier to use than to repeat std:: through the entir...
[4 replies] Last: Here is a thread that demonstrates how you can sometimes cause trouble... (by kempofighter)
Error Running with Strings
 
I made this code for a game called ProjectTrig http://www.mathplayground.com/ProjectTRIG/ProjectTRIGPreloader.html . Using this, I can accurately calculate The ...
[2 replies] Last: Those two articles helped me but the the one made by Zaita is the exa... (by mainframe639)
Why wont this compile
 
Can somebody please explain why this won't compile. It falls over at line 20 with 'cannot convert from 'const char ' to 'char'. should i be using ==...
[7 replies] Last: http://cplusplus.com/forum/beginner/24772/ (by m4ster r0shi)
Compiler gives out a memory error - Don't know what is wrong
 
Hi, I am trying to program a numerical routine involving the Gnu Scientific library. Unfortunately I get the following error when trying to free the memory I...
[no replies]
June 2010 Pages: 1... 1718192021... 26
  Archived months: [may2010] [jul2010]

This is an archived page. To post a new message, go to the current page.