Beginners - January 2020 (Page 5)

by seatea
Vectors (1,2)
 
Hi! Imagine having a function like the following: typedef unsigned long long long_type; long_type fibonacciIteration(size_t nthNumber) { size_t x = 0, ...
[22 replies] Last: You only store one value in stats. You print it once at line 47. I su... (by dhayden)
by Bopaki
Getting an unndefined error on this funcuon
 
I copied this function from DS Malik textbook. template<class Type> ostream& operator<<(ostream& osObject, const doublyLinnkedList...
[5 replies] Last: http://www.cplusplus.com/forum/general/113904/#msg622073 (by ne555)
FEEDBACK PLZ, basic code assignment
 
I know this is a C++ forum but i thought you guys might be able to help or give any feedback on this very simple JAVA assignment. i was able to get most of it d...
[1 reply] : You really need to test your code as you write because there are a lot... (by fiji885)
Guidance
 
Hi, I haven't programmed much in about a year. I have now enrolled in an online class, and there are no refreshers. Just an assignment right off the bat. Unfort...
[3 replies] Last: I appreciate your guys input. I was able to work on phase one some and... (by stoneJax)
Header Guards
 
Uuuuhhh so, am I supposed to put header guards in just the .h file or in both the .h file and the .cpp file? ——————————————...
[3 replies] Last: Cool ok thanks guys! (by highwayman)
by ema897
end line
 
I split a line into token. I have to compare with other word, but I notice that when I arrive at the end of the line, last token is for example: endline\000\...
[6 replies] Last: getline(_my_file,line); while(i<line.size()){ word.clear... (by ema897)
Dungeon Crawl Game
 
I've been working on a simple dungeon crawl game. I've run into an issue moving my player's character among the board. Currently the program has a function that...
[5 replies] Last: Line 99: Do not call srand() multiple times. srand() sets the RNG to ... (by AbstractionAnon)
by Bopaki
How can I make this code to be a template?
 
Here is the code: doublyLinkedList& doublyLinkedList::operator<<(const int value) { insert.first(value); return *this; } I have been trying and...
[5 replies] Last: That is a completely different function though... Your original functi... (by Ganado)
Vector
 
Hi, how to use public data of type vector out of class?
[12 replies] Last: Thanks, I noticed my program does not work like it was imagined. I thi... (by Agent 003)
How To Solve This Problem
 
I want to make a program like this using while please help me jumlah digit 9 000000000 ///jumlah digit menentukan panjang digit 000000001 ///per digi...
[19 replies] Last: OK THANK YOU VERY VERY MUCH ,,,BECAUSE YOUR ALL HELP ,, I'LL BE INCLUD... (by RezaFauzan945)
by ema897
graph visit
 
I can't implement graph visit (BFS and DFS) of my graph, I'm stopped for many days.. please help me. I have graph with this class: class myClass{ pub...
[3 replies] Last: I have to implement different visits. I don't if the graph is actually... (by ema897)
by hbcpp
Formatting a table
 
It is problably a dull question so I apologize in advance. Can anyone get this two-row table algined, it is supposed to be aligned. I have tried changing the n...
[6 replies] Last: I'm 100% n00b. I come here to learn. The group here are kind to people... (by dune)
by ema897
How to delete line in file
 
How is it possible to delete a determinated line? For example, I have this file: line1 line2 line3 line4 And I want to delete line3, and the file will...
[2 replies] Last: thanks. (by ema897)
How to start / Which language in C++
 
I like programming but something is hoding me back, i think its because i have no point to focus on, its also really hard for me to choose which language in C++...
[11 replies] Last: Is it recommend to learn the basics on C++ You will find programmin... (by Repeater)
Palindrome (1,2)
 
Hello All, I need help with an assignment. Please keep in mind I'm a pure beginner. I really don't know much beyond basic cin and cout. So please keep that i...
[33 replies] Last: You're getting very close. Explain what this code does. As you explain... (by dhayden)
How to do RegEx strings check in two files fast?
 
How do I check if some strings in file A is somewhere in file B (not in the same line number of each file)? e.g. a line in file A is "2, 3, 4" and somewhere ...
[2 replies] Last: > I used Python and it is incredibly slow... for a 2G text file it tak... (by salem c)
Reading in a text file into a string array while ignoring single characters
 
I am trying to read in a text file into a string array. I am using a for loop to do that. But i have no idea how to get rid of single character words, such as: ...
[3 replies] Last: constexpr int max_words = 1024; std::string words std::string word; ... (by mbozzi)
Data segment
 
Hi everyone, so I have to create a Queue with elements and everything and I seperated part of the code so that I can concentrate on the FIFO(First in first out...
[4 replies] Last: Well there's 2 words I didn't think I'd hear again haha. No worries, t... (by lekfanda)
2D vector declaration Seg fault core dump
 
Hi experts, Please help, I do not know why this code Seg fault core dump. #include <iostream> #include <vector> using namespace std; const int n...
[4 replies] Last: @lastchance, Sorry for late reply, thanks a lot for the instruction... (by Beherit666)
Splitting linked list
 
Create a function to split 2 singly Linked Lists according to following rules. Split 1 linked list into 2 linked lists with alternate nodes. Input : List...
[5 replies] Last: i tried the previous code there is a problem when you input a diffren... (by dhayden)
January 2020 Pages: 1... 34567... 12
  Archived months: [dec2019] [feb2020]

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