Beginners - August 2016 (Page 13)

non recursive merge sort
 
I have to write a non recursive merge sort. I feel like I'm almost there but, It's not sorting the last part of my array. Any help would be awesome. I know the ...
[2 replies] Last: Add std::cout << "merge " << low << ' ' << mid << ' ' << high << ... (by dhayden)
by punani
Inheritance and composition (point, square, cube)
 
For my assigment, I have to create classes for point, square and cube, by inheritance and by composition. I did the inheritance part, but I dont really understa...
[4 replies] Last: http://www.cplusplus.com/forum/beginner/195750/ (by closed account 48T7M4Gy)
by punani
Inheritance problem
 
For my assignment, I have to use inheritance to represent Point, square and cube. My problem is that when I run the program, it doesnt give me the area nor the ...
[1 reply] : http://www.cplusplus.com/forum/beginner/195656/ (by TheIdeasMan)
why wont my switch statement work
 
I finished writing my program, but as I debug it, my chosen choice goes to the default statement in my switch statement. I don't know why... Put the code ...
[1 reply] : The variable you are switching on (choice) is an int. Your case state... (by closed account E0p9LyTq)
Is it the right way to trap error
 
Hi, I make my own real time assert function which can effectively attract a debugger in a program's real time : void fatal_assert_print(const char* format, ...
[10 replies] Last: I give up. There's no way he's not trolling. (by NoXzema)
by xymon
I can't integrate the header file
 
Hi, I read the book programming principles and practice using c++ by bjarne stoustroup. He uses a header file with several instructions to simplify the practic...
[11 replies] Last: Back to the poster's problem. Try typing the full path to the header f... (by Too Explosive)
Virtual class program C++ starts now, please subscribe. (1,2,3)
 
Hi, I have created a class program to learn C++ Learning togeter might be very inspirational and motivating. Anyone wants to 'join' this 'class'? You can ...
[43 replies] Last: New members: you can join by sending BlurgenStein a PM with your email... (by Albatross)
Course program: Principles & Practice book (Stroustrup) - please join class!
 
Hi, I have created a class program to learn C++ This program is about working through the book 'Principles and Practice using C++' from B. Stroustrup For in...
[5 replies] Last: New mentor added Homework extended to the 15th of august coz others a... (by BlurgenStein)
by MAhmed
Correct errors
 
Please someone correct errors below please thanks #include<iostream> using namespace std; class student { // member data private i...
[7 replies] Last: Line 8: You're using string, but have not included the <string> heade... (by AbstractionAnon)
the while loop doesnt break. anyone knows why
 
#include <iostream> #include<string> using namespace std; int main() { string x=""; cout<<"please enter a word\n"; cin>>x; int no=x.size(); while(no>...
[6 replies] Last: People have kindly taken the time and effort to explain why, in their ... (by MikeyBoy)
by iluah
weird symbols popping up when executing code
 
This question is asked already, but I still am not able to fix it. Its an simple excercise from my studybook to copy an array into a vector. I read in the study...
[5 replies] Last: Facepalm moment :/ Books code are fine, I edited the orginal code to ... (by iluah)
by thexiv
How to get a sequential data from a string
 
I have nearly everything in working order here. I just need the last variable in this. I have it commented (unlike anything else in the program ;P). Being as I ...
[8 replies] Last: This is what solved it. 0 in ASCII is 48. So I take 48 away and I get ... (by thexiv)
Ofstream not working!! :(
 
It does not overwrite nor create the text file i need, :( pls help. *C++ is running as admin already* #include <iostream> #include <fstream> #include <st...
[3 replies] Last: Where files are created or need to be for access by your program depen... (by closed account E0p9LyTq)
by f9t0
How to display Greek chars in console ?
 
This has probably been asked before, but i need to display greek characters on my programs. A cross-platform solution would be best, but i need it to work at le...
[5 replies] Last: I just tried running my program with system ("chcp 1253"); but i... (by f9t0)
Count # of zeros in binary representation
 
I'm trying to solve a problem from a textbook. "Write a recursive function that returns the number of 0s in the binary representation of N. Use the fact that ...
[4 replies] Last: @booradley60 Thank you. I think that's probably how you are supposed ... (by mpark4656)
by ghotez
How to generate random hermitian matrix
 
Hi, i want to make a hermitian matrix using random numbers. i have typed this code #include <iostream> #include <cstdlib> #include <iomanip> #include <ct...
[4 replies] Last: LOL ... Next! :) (by closed account 48T7M4Gy)
Wiriting Through Free Store Pointers
 
So I was wondering. Well, let me show you the (shortened) code... char* devowel(const char* orig) { //Omitted for brevity //Resize removed_copy =...
[7 replies] Last: I'm putting this in another message because it's worth noting that's ... (by dhayden)
i Want code of these programs
 
Write your question here. 1. Create a class called Laptop 2. It has following member variables a. Serial no of type int b. Manufacturer of type string c....
[2 replies] Last: It's so simple! Take an example of a class definition and re-model it... (by closed account 48bpfSEw)
reference operator
 
i'm pretty much a beginner c++ programmer and came across this the other day when learning overload operators: and in this code: CVector& CVector::op...
[3 replies] Last: thanks for the information! it really helped me understand the topic! ... (by globaltourist)
How do I create 32bit executables with mingw-w64?
 
I'm able to successfully create 64-bit executables with the mingw-w64 compiler in my Windows (64-bit) cmd prompt: g++ main.cpp -o App I properly added the...
[1 reply] : I found the answer :) Just add a -m32 flag after g++. Example: ... (by hashbrown)
August 2016 Pages: 1... 1112131415... 22
  Archived months: [jul2016] [sep2016]

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