General C++ Programming - February 2012 (Page 17)

by LB
Null terminator in the middle of a std::string
 
Is the output defined? #include <iostream> #include <string> using namespace std; int main() { string a = "Hello, Internet!"; cout << a.size() << endl...
[4 replies] Last: I mean, I wasn't sure if the C++ language standard stated that std::st... (by LB)
Parse a xml file in vc++
 
Hi all, I have to write a program in VC++6.0 in which I have to read a xml file into buffer and then parse it to display the contents and values of all the n...
[6 replies] Last: If you have a specific problem, and can post the key details, then som... (by andywestken)
a RT error with iterators
 
Hi All, my program returns a run time error and I'd be pleased if you help me to figure up the problem. I have a vector of pointers to myClass (which is sorte...
[9 replies] Last: with Random Access Iterators, why does it matter? For a vector, it do... (by kbw)
Help!!
 
How can I make this display using only 2 for loops: ** **** ****** ******** for(i=1;i<=4;i++){ for(j=1;j>=8;j++){ cout<<"*"; } ...
[5 replies] Last: You might want to play with while too! int main() { for(int i=1;... (by Baigo)
by viliml
adding new types to cin/cout or scanf/printf
 
Is it possible to add new types like pairs, vectors, queues or some custom types to cin/cout or scanf/printf?
[17 replies] Last: Yes, but using the & signs where you used them there means address of... (by LB)
by JnrGD
how DLLs work
 
Hi guys, I've been wondering about DLLs. I understand that you can declare a class in a DLL and then using a wrapper, which can even be in a different langua...
[6 replies] Last: [quote=qwertyusername]after I load the DLL in the external application... (by LB)
by Laveer
Turning a program on and off with winsock
 
I wanted to try and use this as a form of ' protection ' for a project I'm working on. I've seen it done before and I've attempted it as-well a few months back ...
[2 replies] Last: I was thinking that's exactly what the world needs is another socket l... (by kbw)
a C++ program with a function named FindMax that has two parameters
 
Task: Write a C++ program with a function named FindMax that has two parameters, one in type constant pointer to constant double array (i.e. const double* con...
[6 replies] Last: http://www.cplusplus.com/forum/articles/31015/ I found a pointer more... (by ne555)
by vvk4
C++ hash_multiset for string question
 
Can I use hash_multiset for storing string values and then searching if the value of another string exists in my set? Below is my program. I am populating hash_...
[1 reply] : Why would it find it? The original char * value is not going to be the... (by LB)
Text problems
 
Add the following to your program: · A counter within the while loop that keeps track of the number of inputs entered · A comment t...
[2 replies] Last: if u r using visual studio make sure u r running program( hollow green... (by vivmen)
by Zapeth
string::begin and string::replace - bad combination?
 
Hi so I want to go through a whole string and replace all occurrences of a newline with a ", ". I am doing this by iterating through the string (so I know when...
[14 replies] Last: okay, thanks for the explanation ;) (by Zapeth)
If and Else If statement quandary...
 
To preface this post, I want anyone who is interested in helping me know that the only reason I posted the entire assignment is to give you a better understand...
[1 reply] : I have never seen C++ before in my life [...] http://www.cplusplus.co... (by Null)
Malloc to C++ version
 
I cannot figure out how to change this C code: curr=(struct node*)malloc(sizeof(struct node)); to C++. It will not run in the terminal and this is the al...
[7 replies] Last: Thank you, Disch. I wasn't aware of that. I've been using new/delete s... (by roberts)
extract data from it.
 
I have a huge file which contain characters like Ä/ºÞÃ5€hCƒ3 I need to extract the data that stored in it.. please give valuable suggestion.
[1 reply] : http://cplusplus.com/reference/iostream/ifstream/ std::ifstream ifs... (by Galik)
by jham92
High Card
 
I am creating a program that asks the user to enter cards and then i need to tell them which on is the highest any help pr advice would be great thanks
[1 reply] : pseudocode int highest = MIN; while get input: get user input... (by closed account o1vk4iN6)
Please Help-Output problem
 
Can someone please help me with the following program. I got a question for homework and i tried to make a program but this gives the wrong output. The qu...
[6 replies] Last: Thank you so much FlashDrive i did what u said and i get the correct a... (by priyanshm)
searching through vectors and more
 
i have a text file which i put all the strings into a vector. i have successfully been able to search through the vector, however i want the words typed in only...
[2 replies] Last: your right sorry, i just editied the code above to make it a little ea... (by ramus313)
Driver will not recognize header file, please help me.
 
How are you guys, this is my first post on this website. I am extremely desperate. I have a C++ program and I am running into a problem: I have a header file...
[1 reply] : #ifdef should be #ifndef (by Peter87)
self taught seeks transition
 
I taught myself ActionScript in flash 5 a hundred years ago. I wrote several simple games, worksheet generators, and explanation videos for my students. All c...
[1 reply] : As far as I was aware iphone and ipod applications where built in the ... (by ubernoob)
Help with my program!
 
hello everyone, so i was wondering if i can get help with my program. Ok so i'm suppose to create a program that performs different types of encryption or decr...
[1 reply] : I think that string DecryptUsingRot(string word); and bool DoRotDec... (by lugiamaster)
February 2012 Pages: 1... 1516171819... 43
  Archived months: [jan2012] [mar2012]

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