Beginners - October 2017 (Page 21)

string concatenuation
 
i want to ask how to add 3 different string Put the code you need help with here. #include <iostream> #include <string> using namespace std int mai...
[3 replies] Last: http://www.cplusplus.com/reference/ios/ios/fill/ (by AbstractionAnon)
Problem with classes and other issues
 
I am trying to write a code that will allow the user to input words that will then be manipulated by the code to either make all letters lower case, reverse the...
[1 reply] : There’re errors in your code, but I think the main point is classes ... (by Enoizat)
by ericM
reading garbage after eof
 
I am reading values from file filling up a std::vector. Everything works fine but it happens I read in some extra garbage and push it in my vector. More precise...
[3 replies] Last: cool, I was aware how to do this by reading a single value, I didn't k... (by ericM)
Loading .dat file into 2D vector
 
I have a .dat file with one long row of integers separated by a space. I need to load this file into a 2D vector of specific rows and columns. Any pointers on w...
[2 replies] Last: you start building a 2d array to store your values #include <array>... (by ericM)
Can't get program to fout with ofstream!
 
I need this program to read the output into a .txt but for what ever reason I cannot get it to do so. Can anyone take a look a this and help me figure out the ...
[4 replies] Last: source.txt: L 4.0 600 650 N M 3.9 610 520 N L 3.8 590 600 N L 3.0 600... (by Enoizat)
by chuvak
Expression must have a class type?
 
Hi forum, I reckon something is wrong with my reduce function, because when I remove the .reduce() from line 111, the keyword this becomes no longer red-un...
[1 reply] : Why oh why don't you tell us what the error associated with the "red u... (by Ganado)
CLR
 
Everytime when ı was a create CLR project ı get this error how can ı fix it ? Instances of this error (1) 1. Show Call Stack at Mi...
[2 replies] Last: Google Translator says: (form Turkish - detected): “bu islemi tamaml... (by Enoizat)
by glof2
Load feature is not working...
 
I'm not getting any error etc. I have file called "wizytowka.txt" and text in it. But everything i see is - - 0 - btw - is nothing. The feature that say...
[5 replies] Last: I’d also check if there are empty lines in the secret text file “w... (by Enoizat)
by ericM
STL vector container question
 
Hello, I am trying to use STL vector container to store a set of fixed dimension arrays. Everything works fine until I try to push_back() new values. in code t...
[2 replies] Last: I manage to get it work by using typedef std::complex<double> dcomp... (by ericM)
by MrGoat
Implementing an ADT
 
[4 replies] Last: Thanks again. Appreciate the help (by MrGoat)
Passiing vector as a parameter
 
This is why programming is so frustrating to me. In my class, I didnt even know what a C++ vector was until this assignment was due. ??? Anyway, I need to pass ...
[8 replies] Last: Thank you so much! (by donda97)
by ericM
deep copy an object containing fixed length arrays
 
Hello, is there a standard way to copy an object for which one or more fields are fixed length arrays? The object looks like myStuff.hpp #define LMAX 101 c...
[3 replies] Last: thanks, that was indeed useful (by ericM)
Searching through an array
 
So i have a function thats supposed to go through an array and look for a ID stored in that array, and if its not found itll send back -1. the problem is , wh...
[2 replies] Last: Ohh i get it! that code works. Thanks alot! (by wajahatshoukat)
Craps game problem..
 
So i have to write a craps game and the rules for it must be: If the sum of the first roll of the die is 7 or 11, the player wins. If the sum of the first roll ...
[1 reply] : for the "randomness": // random number stuff std::random_dev... (by ericM)
please help
 
Could someone help me with my hw here is the problem i have and the code "In this exercise, you create a program that uses two nested loops to display two diffe...
[3 replies] Last: yes, but you have to update the incremental value in the for loop so t... (by ericM)
Please help with stuck
 
Input The input to your program is a series of lines, each with three values. The first value is a celestial body- either a capital P (planet), M (moon), S(sta...
[7 replies] Last: This is what i have now the only problem is i can not put multiple inp... (by GreWeezy)
Need help with While Loop
 
Why do I get 66 instead of 55? Don't know what I am doing wrong since x only goes up to 10. I wanna display it and get the sum. Any help? #include <iostre...
[1 reply] : because your cycle will produce for x and sum x 0 1 2 3 4 ... (by ericM)
program not working if statements
 
My first statement works fine, but the second gathering type does not, and I can't figure out what is wrong #include <iostream> #include <string> usi...
[6 replies] Last: Hello snappleisawesome23, You are using integer division. There is no... (by Handy Andy)
Circular Doubly Linked List
 
Hi, for this assignment, I am to implement a program that would read a series of cities from a text file and put it into a sorted circular doubly linked list wh...
[1 reply] : This function allocates an empty node A node. One node. CityList:... (by keskiverto)
Error C2109 in an array
 
I'm having the error C2109 (subscript requires array or pointer type). My program is suppose to read and put in an array the file Inventaire.txt which shows inf...
[2 replies] Last: Thank you Peter! it works now! (by FredGrosPen)
October 2017 Pages: 1... 1920212223... 33
  Archived months: [sep2017] [nov2017]

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