General C++ Programming - January 2016 (Page 13)

2d char array
 
Hello, could some show me some basic code of a 2d char array which is dynamic in size, that does not use char** but can only use a char pointer (char*). the num...
[2 replies] Last: First you need to create an array of strings. char arrayOfWords ; Th... (by Nivin17)
Kindly and urgently correct me in this code
 
I am late in submitting this college project. The below code should make an excel-like table (a dynamic 2D array) which the user chooses the number of records h...
[3 replies] Last: So.. i intend these to be column headings:LR_Unit_Number\t Name_of_pr... (by Mwangi Elijah)
access violation error
 
Hello everyone. For some reason when i run the following code i get a access memory violation error. [\code] void indexing(list<string> passwordList, char *...
[3 replies] Last: val = '\0'; Where does currItr get set? This function increments it... (by dhayden)
Strange behavior
 
Hello, the following code runs in an environment where there's no OS. And, by now, no memory management. It does the job well, if I uncomment the print(".") ...
[3 replies] Last: You're a 100% right! It worked. Thanks buddy. (by bigorenski)
Pointers
 
#include <iostream> #include <ctime> #include <cstdlib> using namespace std; int *minuscontent(int *, int); int *randomize(int *, int); int main() {...
[5 replies] Last: Okay, thank you very much guys. (by HumbleAAT)
cannot convert 'std::string' to 'int'??
 
So I'm going back and reviewing some old concepts in c++ and as I got to arrays I wanted to make a random color name generator using an array and the rand() fun...
[2 replies] Last: I did not think just changing the type would work, and didn't even try... (by Rodr1697)
Load code from text
 
How can i load code from a text file to be executed by the compiler?
[10 replies] Last: Just for anybody that might come across this, I found something that I... (by andrewllewop)
STL Vectors in visual studio
 
Is there a way to include strings directly STL vectors in visual studio C++> I can get integers and single letters to work, but not strings.
[9 replies] Last: You can use System::String like this: System::String^ str = gcnew Sy... (by Thomas1965)
Help with code
 
#include <iostream> using namespace std; int main() { char response; cout<< "Are you having a good day?"<<endl; cin>>response; if (response == '...
[1 reply] : #include <iostream> using namespace std; int main() { char respon... (by Moschops)
Writing a generic method that prints any object
 
Hi, I have a Generic LinkedList class. It contains a display method, which prints the value of all the nodes in the linked list. Node contains a 'value' which ...
[1 reply] : I cannot overload << in my LinkedList class, because I wont know abou... (by cire)
How to pull out specific data from char array in cpp?
 
I'm working on a school project and encountered some difficulties. My program reads a *.txt file containing ls -l instruction and assigns it's lines to char arr...
[1 reply] : Since the tokens are nicely separated by spaces you could use strtok t... (by Thomas1965)
Solve it.... (1,2)
 
A sales person leaves his home every Monday and returns every Friday. He travels by company car. Each day on the road the sales person records the amount of gas...
[34 replies] Last: Next time, please do us a favor and describe in words what the program... (by mpark4656)
q: objects and member access
 
1.) SOLVED In the code below is &a the address of the newly created object a? What is the relationship between A and &a in that line? #1 - SOLVED ...
[6 replies] Last: to access actual object at this address you need dereference a point... (by technologist)
Array of String doesn't work properly
 
Hello. I've made my own Array and String class. The GArray (of a given type) accepts, as costructor parameter, a size template<typename GType> cl...
[10 replies] Last: Oh gosh, what a stupid. There was the problem! Thanks! (by gedamial)
by Gyiove
What is slowing my code down?
 
Hello everyone! Here's my code: http://pastebin.com/r9shpjbF and here's a code from where i rewrited it: http://pastebin.com/p9w7zd5T this is how i run the...
[2 replies] Last: I'm recoding the whole thing again because of that mistake. I bet ther... (by Gyiove)
by Kubani
Books on QT5
 
Hi all, Is there any good book on Qt5 for programming iOS and Android apps please?
[4 replies] Last: But how to post new topics? How to distinguish between codes and Itali... (by Kubani)
how to instantiate a class template on the heap
 
I have a template class called BST and BSTNode: template<typename Data> class BST { //code } template<typename Data> class BSTNode { //code } H...
[3 replies] Last: Armonsafai, yes, you do it the way you said. template<typename Data>... (by Peter87)
StaQue round robin array
 
#include <iostream> using namespace std; template <class T> class StaQue { public: //constructor StaQue( int size = 1000) { MAX_SIZE = size; front = -...
[4 replies] Last: thanks i will work on it (by usama shahid)
by e7kim
String error?
 
For a school lab I have to take in an email input and output the username before '@' and the site type. The site type is either the last three letters of the ad...
[3 replies] Last: you've got while (getline(inFile, countries )) //75 { getli... (by ne555)
by e7kim
Vector error
 
For a school lab I have to take a text file with songs and out put the lines in a certain format with the total time below. I am done with my code but when I ru...
[6 replies] Last: Favour value semantics for the vector. Let each function do just one t... (by JLBorges)
January 2016 Pages: 1... 1112131415... 18
  Archived months: [dec2015] [feb2016]

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