Beginners - March 2016 (Page 29)

by RiRoxX
std::lenght_error - How to fix/get around?
 
Hello! I'm a c++ beginner, so to learn the language, I watch tutorials online or make up some program and try to advance it as much as possible. So, I wanted ...
[6 replies] Last: Hi! Thanks for the extra comments. I Have corrected the mistakes in t... (by RiRoxX)
How to submit code?
 
telling me too much characters , that I'm over the limit
[3 replies] Last: Just knowing how many lines of code you have isn't quite enough inform... (by Moschops)
Help With C++ Assignment
 
Hi everyone, I need help with this assignment my teacher gave me. I'm very lost right now. If someone could help me out and explain how to do this code, I would...
[5 replies] Last: Hello, sorry for the late reply. What parts are you stuck on? I would ... (by McNo)
Allocator rebind problems
 
I'm trying to rebind allocator to some other type but it doesn't want to work no matter what I do f I try this #include <memory> int main() { std::allocat...
[2 replies] Last: Ohh, thank you man very much :) Much appreciated! (by etrusks)
Menu Program Help?
 
I run through the program once, entering all of the grades, but when I chose option 2 (line 77) the grades do not carry over, and it displays default, which I s...
[4 replies] Last: Hi, Realise that the compiler compiles the statements in the order th... (by TheIdeasMan)
Assign a value in array
 
so I have an array int numarray ={1,2,3} and when I cout it it's 123000 how would I replace the 0's inside the array with a -1? thank you.
[1 reply] : // Assign -1 to the last 3 elements for (int i = 3; i < 6; i++) { ... (by Thomas1965)
by Eli1
"expected ';' before string constant error"
 
Hi, I have this error and I don't know why, please help me. Thank you... ( I have to calculate the result of 3 different operations in the same program) __...
[5 replies] Last: Since i is an integer, adding 0.05 to it will leave it unchanged. (a... (by Chervil)
by csnook
Friend Function operator overload+
 
Need help with a friend function that accepts a char* and string from a class and appends them. This is what I put into the function but it returns garbage and ...
[4 replies] Last: Implement String1 & String1::operator+= ( const String1 & ) . Then yo... (by keskiverto)
Please help with moving char across screen.
 
#include "stdafx.h" #include <iostream> #include <conio.h> #include <Windows.h> #include <string> int main(){ std::string grid = "0000000000\n" "000000000...
[2 replies] Last: The problem is that the while loop keeps on looping like I keep on cl... (by Chervil)
by m0shka
Return array from function
 
Hey guys, My homework question code wants me to print 100 random lower case letters. I did everything. I just need help from returning the values stored in ...
[1 reply] : Within the function createarray , you create an array. When the funct... (by Moschops)
I have a problem with strings
 
Expected primary expression before char I also want to sort the characters in alphabetical order, but i don't know how. #include <stdio.h> #include <string...
[3 replies] Last: #include <stdio.h> is C. The C++ equivalent is #include <cstdio> ... (by Moschops)
understanding recursion
 
Hi Am trying to understand recursion. Found 2 programmes from a book I am working through at the moment, to help me work through this. The first I understan...
[no replies]
Arrays
 
I'm creating an array that will be used to represent the products selected by the customer (program user). Can anyone help me out with this? Not really sure how...
[1 reply] : You could create a class product_info like you did with customer_info ... (by Thomas1965)
Help with Dungeon Crawl problem.
 
problem: Make a program that outputs a simple grid based gameboard to the screen using either numbers or characters. i.e. . . . . . . . . . . . G . . . . . . ....
[1 reply] : What is the question / problem ? (by Thomas1965)
want to make GUI for my programs in code blocks
 
How to make GUI for programs in code blocks ? anylinks available ??
[2 replies] Last: I'm a big GTK+ fan. The C++ bindings for GTK+ is called gtkmm and is d... (by kind9)
by Bopaki
Loosing one node in my program
 
Write your question here. When I run my program, the node with info=30 gets lost. Please help Put the code you need help with here. #include <iostream> ...
[no replies]
Invalid conversion from int (*) to int. How to fix?
 
Hi, I'm trying to write a code that finds all the perfect numbers within the given range and store it in an array, and then std::cout it. Here is my code: ...
[1 reply] : To call a function you need the round brackets. Passer = ifReturnPerf... (by Thomas1965)
A function that takes an int arg and returns a pointer to an int[5] array
 
Hi I am trying to create a simple function that takes an int arg and returns a pointer to an int array. The array and function definition are defined as ...
[7 replies] Last: Yes, you are quite right. Actually, I had forgotten to initialize the ... (by SSteven)
by csnook
Help with overload=(char*) member function
 
My main calls this function using S4 = "Test". When these values are passed to the following member function the char value "Test" is not set to s4. Any ideas. ...
[no replies]
why this doesnot work
 
in main.cpp==> #include <bits/stdc++.h> #include "myclass.h" #include<string.h> using namespace std; int main() { string name="harshit"; m...
[1 reply] : Not sure what's not working but here is the code that I put in main.cp... (by Fariseagle)
March 2016 Pages: 1... 2728293031... 47
  Archived months: [feb2016] [apr2016]

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