Beginners - August 2017 (Page 7)

Anyone knows whats up?
Its a game of life. Loads everything from inp.in. Tough after the first step everything dies. Any ideas? Please explain if you have something, don't just do my...
Aug 20, 2017 at 12:23pm
[5 replies] Last: Though it is only a warning, it should be considered an error in most ... (by Chervil)
by Bopaki
I do not know what to do to solve this problem with iterators
Write your question here. I typed this program as it is in the textbook by Walter Savitch Put the code you need help with here. //Program to demonstrate...
Aug 20, 2017 at 11:52am
[7 replies] Last: I don't have the book so I don't know what's wrong with it but 2006 is... (by Peter87)
by Tobruk
When to use namespace {} and when :: in multifile projects
Hello! :) I'm a bit at sea when it comes to both namespaces and externs. If I do this in file.cpp namespace ns { enum loc { ... }; // or class loc { ... } ...
Aug 20, 2017 at 10:41am
[6 replies] Last: Hi, Tobruk. As a matter of fact, these files main.cpp: #include <ios... (by Enoizat)
Why won't code from this tutorial work?
I've been following a tutorial series by MakingGamesWithBen and have had no issues so far other than pointers not working. This is probably because he uses the ...
Aug 20, 2017 at 8:25am
[1 reply] : The errors I spot at first glance are the missing parentheses that are... (by Peter87)
How do I create shapes like squares and circles by using c++
How do I create shapes like squares and circles by using c++? Which libraries should I use to achieve this task ?? What should be my approach ? Any guid...
Aug 19, 2017 at 8:35pm
[7 replies] Last: Nice functions, masecla33. (by Enoizat)
Palindrome, no spaces
So I've written a program to check whether a sentence is a palindrome or not. I specifically used an array for that and the program is supposed to ignore spaces...
Aug 19, 2017 at 6:22pm
[5 replies] Last: Sorry for being a little late, #include <iostream> #include <cstring... (by masecla33)
by h4ever
find substring & replace string
String like this: some thing:200 // some sentence I can find position of ":". But now I need to get the string "200" which is after the : and before a space....
Aug 19, 2017 at 4:29pm
[11 replies] Last: Yes. (Assuming that the type of prevLine is std::string )... (by JLBorges)
by Bopaki
What does this error mean in the file: Makefile.win
Write your question here. I am trying to compile my program and this is what I am getting: It is complaining about the outstream (operator<<) and its address....
Aug 19, 2017 at 12:54pm
[2 replies] Last: Are those the only "errors" reported? Why are you #including a .cpp f... (by jlb)
by h4ever
How to replace line read from file
I am trying to change the line when there is no chars in it. I tried this: line = line + "<h3>" + cStr.str() + "<h3>"; but it breaks the program during deb...
Aug 19, 2017 at 12:49pm
[3 replies] Last: I solved it like this: getline (ifs, line); if ( line.length() == 0... (by h4ever)
Why Do I Need the "Typename" Keyword here?
Consider this code: #include<iostream> #include<vector> using namespace std; template <class T> class MyClass { public: MyClass(unsigned g...
Aug 19, 2017 at 11:49am
[3 replies] Last: > The name "vector<T>::iterator" is a dependent name because it depend... (by JLBorges)
Problem to read char arrays
So, I need to write a code where it reads 2 char arrays dynamically allocated, and then output what is in array1 that is not in array 2. BUT, my input Must hav...
Aug 19, 2017 at 5:27am
[4 replies] Last: @Duthomhas Don't use ~0UL there! The result of the conversion from ~... (by mbozzi)
Program error
Hello. So this program should read N and then N numbers greater than 9 from a file, then if the first two digits of a number are not a perfect square it should ...
Aug 18, 2017 at 9:46pm
[4 replies] Last: Thanks to both of you I got it to work (@lastchance and @keskiverto). ... (by FraNNNkie)
Rewrite if/else statement into switch statement?
How do I rewrite the following into switch statements? Do I have to define those conditions in the if parentheses? int x = 0; int i = 1, j = 2, k ...
Aug 18, 2017 at 9:22pm
[5 replies] Last: Thank you. (by Enoizat)
Acces other class array elements
Howdy! I'm making a chunk system like minecraft ones, and I need to gather element from it's neighbor to optimize the faces drawn or not between the chunks. So...
Aug 18, 2017 at 7:10pm
[no replies]
I somehow got an integer repeated...
So I wrote this code. I was required to: Write into a new text file all integers between [1,16]. Output only those numbers inside the text file that are small...
Aug 18, 2017 at 4:32pm
[9 replies] Last: Hello Gieniusz Krab, Your welcome. Glad I could help. Cheers, Andy (by Handy Andy)
Help with selection sort
I've been working on this code for a while. I've got almost everything down except for the selection sort. It does not sort and displays garbage for empID inste...
Aug 18, 2017 at 3:46pm
[6 replies] Last: That edit somehow removes the sorted numbers and keeps the junk :o (by hihihello)
by pizza
Pointers Polymorphism
Hello guys! Thanks in advance for your interest. My question seems to be ridiculously long but I just want you guys to look at line 253~266. I swear to god this...
Aug 18, 2017 at 3:39pm
[7 replies] Last: Enoizat , TheIdeasMan Wow this is such a piece of advice.! I can't... (by pizza)
c++ on macbook air
Can anyone pls help me on how i can use my macbook air for compiling and excecuting c++ programs. Im a complete begingner in programming. Thanks.
Aug 18, 2017 at 2:53pm
[6 replies] Last: I'm running MacOS Sierra 10.12.4 (I haven't updated my OS in a while).... (by Hengry)
Struggling with C++ programming assignment
Hello everyone, I've just started a degree in Info Security and Networking and one of the fundamental courses I have to take is a Programming course on C++. Ri...
Aug 18, 2017 at 2:45pm
[9 replies] Last: Shorter? #include <iostream> int main() { char again = 'Y'; ... (by Enoizat)
by Bopaki
Getting an error on a line, but I cannot see what is wrong
Write your question here. I am trying to compile a file employee.cpp Put the code you need help with here. //This is the header file employee.h //This ...
Aug 18, 2017 at 8:43am
[17 replies] Last: @Thomas1965, thank you for all your hints. I used Eclipse once for a P... (by Enoizat)
August 2017 Pages: 1... 56789... 17
  Archived months: [jul2017] [sep2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.