General C++ Programming - May 2017 (Page 8)

by chep
converting a text to ascii then hexadecimal
 
hey, can someone assist me in writing a code that can produce an ascii and hexadecimal from a text inputed. i know how to write a code that can change ascii and...
[1 reply] : are you asking how to read a file? #include<fstream> ifstream in(fi... (by jonnin)
How can i get the function info_all() to work?
 
#include<iostream> #include<string> using namespace std; class Person{ private: string name; string last_name; double some_num; double some_num2; ...
[8 replies] Last: Thx a lot I almost lost hope that someone would answer my post :D (by spax1111111)
help
 
Express lists the following 3 scenarios: - Massive - Pointer - Link imaging array. Print a list of randomly adding 10 elements. i really dont understand ho...
[1 reply] : I noticed in your previous thread, that you deleted your question afte... (by MikeyBoy)
I need assistance with my connect 4 game?
 
Whenever i input a letter as a column number my program goes crazy and starts printing out text again and again like its in an infinite loop. Would be awesome i...
[7 replies] Last: Why don't you make the Column a char instead? @SamuelAdams solution... (by TheIdeasMan)
by Kalcor
Weird logic error
 
Hello, today while I was solving a simple problem I encountered a logical error that idk why it occured, anyway here it is : Using this input: 9 -565 -752 -...
[2 replies] Last: Thanks for the reply doug, i was kind of lazy to trace it maybe lol ca... (by Kalcor)
How do I overload virtual function with the same name but different returning data
 
As title says, how do I overload virtual function with the same name but different returning data? Here is my code: #include <iostream> #include <string> clas...
[6 replies] Last: Thanks :)! (by Putarda)
String
 
Hi! I have a basic question. How do you remove a character from string. Let's say the user input "This is a string" then asked what char to remove and lets say ...
[2 replies] Last: Another option: #include <iostream> #include <string> using namespa... (by Thomas1965)
by Kalcor
Struct arrays
 
Idk if the title is correct but what I mean is that: struct coords{ int x; int y; }a ; My main question is why can't we use cin >> a normally why does...
[1 reply] : >> is an operator. You can think of it as shorthand for a function. ... (by Moschops)
UDP server
 
I'm wondering if anyone knows how to create a c++ program to create a UDP server? I've used C# which is easier to use, especially in this instance but I'm stuck...
[2 replies] Last: Boost.Asio is useful http://www.boost.org/doc/libs/1_64_0/doc/html/boo... (by mbozzi)
help
 
123
[2 replies] Last: TheIdeasMan did give good hints. Lets just add: the whole can be more... (by keskiverto)
by Kalcor
For loops and sigma notation
 
I don't understand the sigma notation pretty well for some reason, http://prntscr.com/f7v5lc This would be for(int i = 0; i <= 5; i++){ sum += ( 1 / pow...
[2 replies] Last: It's also quite interesting in binary: (1/2)^0 is 1 (1/2)^1 is 0.1... (by lastchance)
by Kalcor
Stack and heap
 
Can some experienced programmer here explain in details what's a stack and what's a heap like in a simplified way, cause what I usually find from searching is n...
[10 replies] Last: @ JLBorges Thanks once again for your excellent answer :+) (by TheIdeasMan)
no operator matches there operands. Vector + Vector()
 
In Vector class I wrote operator + and it's working perfectly. Vector v1; Vector v2; v1+v2; But if I do this Vector v1; Vector v2(); v1+v2 An error is...
[2 replies] Last: The compiler sees Vector v2(); as a function declaration of a func... (by Peter87)
Range based for on map runs endless
 
Hi, I wrote the following code for testing std::map<std::string, std::string> test; test["realname"] = "abc"; unsigned int row(0); for (auto...
[3 replies] Last: Seems like it was the main application. After I did recomplile that, i... (by tsschulz)
by ByMaro
error-abort() has been called! help!
 
#include<iostream> #include<string> using namespace std; class Player{ string user; public: void setuser(); string getuser(); }; void Player::se...
[3 replies] Last: The problem is on line if (secondword.at(0) == firstword.at(4) && sec... (by Thomas1965)
Code Not Working (Sorting Names) in C++
 
Please tell me why my CODE is not working and help me to use getline if you have no idea of my problem. #include <iostream> #include <string> #include ...
[16 replies] Last: Did you run the code and take a look at the results? Always be sure yo... (by Little Captain)
Char array[?]
 
Hi, This is class work so all I need is a little direction, s'il vous plait? I have a teacher that DEMANDS we use char arrays, never strings, and I can't f...
[7 replies] Last: With any luck, you will NEVER have to use memmove or memcpy. These f... (by jonnin)
Simple "welcome" function being ignored.
 
Sorry about the crappy formatting - it looks fine before I post. I just want a simple "welcome" message for my program, but it's being ignored. No errors, no i...
[3 replies] Last: Thank you both for the help. Programming is definitely not going to be... (by callmechewy)
by Kalcor
Tired of understanding this
 
As the title says, my head got blown up by this problem and just on a brain fart-mode right now, I tried using a gcd(greatest common divisor) function , pairs, ...
[1 reply] : Assume WMLOG that L < R (actually, that seems to be given in the quest... (by lastchance)
recursive search mini project
 
what is wrong with this code? Here’s how we do it. Assume our array is already sorted. Imagine our array with indexes low​ to high​. We’re searching for...
[1 reply] : You have errors in several argument lists. You also need to return th... (by lastchance)
May 2017 Pages: 1... 678910... 14
  Archived months: [apr2017] [jun2017]

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