General C++ Programming - November 2013 (Page 43)

by Kay94
seperate string (inlcuding blanks) at tab
 
hello there, i'm reading from a text file which includes a dictionary in UTF8. it has the following structure: word, bla "bla"\ttranslation so there...
[2 replies] Last: yes, this helps! especially the 3rd one is great for my use! so i can ... (by Kay94)
Dynamically create class objects?
 
Hi all, I need some help regarding dynamic vector. Shape2DLink.cpp void Shape2DLink::InputSensor() { string shape,type; cout<<endl<<...
[9 replies] Last: Are 's', 'r' and 'c' pointers to 'square', 'rect' and 'cross'? If they... (by Computergeek01)
by JOzier
write a function called delete-repeat
 
output is wrong I only want to out last sentence and the numbers or the size of new array. Went I try to remove code for array I got errors. Thanks in advance. ...
[4 replies] Last: Thank you ShodanHo. I was thinking to hard on it. It worked. (by JOzier)
How To Store A Variable in Memory When Program Closes
 
How do you store a variable in memory so that it isn't changed when the program closes? I don't have any experience with this and am just wondering how it is po...
[2 replies] Last: Use data files to store any data. Take a look here: http://www.cplusp... (by condor)
Just a Question...
 
I have a simple question. Can a pointer be incremented in a for loop? In my program, I use a pointer variable and use it in a for loop like such: for(*var1 = 1...
[3 replies] Last: Thank you so much, both of you( ! x ∞ ) The method that worked was: ... (by JasperBraun)
Xstring error.. !!
 
this is my code.. but i get error in xstring header file at this part size_type size() const { // return length of sequence return (this->_Mysize); } her...
[4 replies] Last: oh .. thanks :) i used loop instead and it worked :) (by moeedkundi)
A question about pointers
 
I'm working on a C++ program for school that deals with classes and pointers. Could someone tell me what an 'embedded pointer' is? or at least point me in the r...
[2 replies] Last: I also came across the terminology where it refers to an object storin... (by BitRat)
Issue regarding initializer_list
 
I recently tried using the new c++0x standard and I was wondering why the following code won't compile. #include <iostream> #include <vector> #include ...
[1 reply] : My suggestion is: update your compiler. Your first source code compil... (by Catfish4)
by davex
Memory Leak, need help deleting
 
This code probably looks horrible, but I am trying to get rid of all the leaks. I don't know how to delete the dynamic memory I've created. At the end I call ...
[6 replies] Last: Thanks for all the help so far. Yes, it is all dynamic. I still don'... (by davex)
by print
adding array problem
 
these are my problem, however I have a compiler error with this program. it says that array.cpp: In function ‘int main()’: array.cpp:39: error: incompatib...
[1 reply] : find_max() returns a single int, which on line 32 you're trying to ass... (by helios)
by Nonlin
Abort R6010
 
Can't understand why this is error is occurring. I'm just trying to split each line from the text file into substrings that I can store into variables for use i...
[1 reply] : So I figured out why it was doing that. Turns out I had a blank line... (by Nonlin)
What does this compiler warning mean?
 
Every time I compile my program i get this warning : In file included from /usr/include/c++/4.8.2/thread:35:0, from proj2.cpp:15: /us...
[6 replies] Last: I realized I was using C libraries when my program is in C++, so i rem... (by chiedozie)
programme crashes after returning result.
 
I'm just curious why my application actually crashes after it compute the area of a cross. I output is correct but it crashes after it calculation is done. ...
[2 replies] Last: void Cross::setCrossCord() { for (int i=0; i<=12; i++) // if xval... (by vin)
Question about Linked List
 
Here is the step from the instructor: Step 2: The poly.h header file contains a prototype for a private member function that will make it easier to impleme...
[no replies]
Selling programs: Legal crap...
 
I know about getting the license, but is there anything I should look out for if I am going to license and sell a program? I have looked, and can't find an...
[2 replies] Last: Yeah, I don't know what the heck that's supposed to mean... What does... (by IWishIKnew)
iterators
 
Hey guys, I was given a project that I have to complete that uses iterators everywhere. I found the iterator chart on the site, but I'm still confused as to wha...
[1 reply] : It's true that pointers can be iterators, but iterators aren't only po... (by Albatross)
Can't stand with c-style resource management
 
Without RAII #include <iostream> #include <new> int main() { int *arr = nullptr; int *max = nullptr; double *double_arr = nullptr; float *fl...
[1 reply] : > std::unique_ptr<double> double_max(new double(300)); please cut yo... (by ne555)
vector<const T> vs. const vector<T> vs. const vector<const T>
 
What's the difference between: vector<const string> and const vector<string> and const vector<const string> Let's say I have a vector of strings of th...
[5 replies] Last: Thanks to everyone who replied! Now I understand everything. (by benbalach)
Pointer and function troubles!
 
Hey Y'all, I was looking for some help. I have to finish this homework assignment by tomorrow but I really a step in the right direction. I am confused like all...
[3 replies] Last: The only thing the hmwk says is Complete this program, which you will ... (by Totes my goat)
Code help...
 
I need help with my code I am writing. It's been a while since I have done this and I have been working on this for days, but I think I am just getting myself l...
[1 reply] : Can you post your code? and what does '{' : missing function header ... (by Danny Toledo)
November 2013 Pages: 1... 414243444546
  Archived months: [oct2013] [dec2013]

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