Beginners - January 2016 (Page 6)

vector can't display full size
 
Displays only part of the vectors #include <iomanip> #include <iostream> #include <vector> #include <math.h> using std::cin; using std::cout; u...
[8 replies] Last: The console did display every line of text, the earlier lines just wer... (by closed account E0p9LyTq)
by rantiv
Cant figure out whats wrong with my code
 
Receive an integer input from the user. If the original value is in the range 5 <= x <= 10 then subtract 5 from it and print it out. Otherwise, if the o...
[3 replies] Last: Perfect! Thanks so much! It worked. (by rantiv)
access variable inside constructor
 
how to access variable inside constructor class RoutingTableEntry { public: /// c-to RoutingTableEntry (Ptr<NetDevice> dev = 0,Ipv4Address dst =...
[1 reply] : if( falseToDst.hops == 1 ){std::cout<<"hihiih";}//is not working,wh... (by cire)
[Error] no matching function for call to
 
I'm new at C++ and I am messing around with matrices. However I keep receiving error such as: no matching function for call to 'matrixlib::matrix::addMatrices...
[2 replies] Last: Got it resolved. The line matrixlib::matrix::addMatrices(result ,... (by jibicax)
How do I generate a random number between 3-5?
 
I'm trying to generate a random number between 3-5 but I keep getting values like 7 and 6 when I run it. Why is that? I'm using the correct headers and the sran...
[5 replies] Last: http://www.cplusplus.com/faq/beginners/random-numbers/ (by Duthomhas)
Doubles Multiplication
 
So I am trying to get the perimeter of a regular polygon, but when I multiply the number of sides times the length of a side, its rounding. How do I keep it fro...
[1 reply] : line 47 and 49: int. a regular polygon: number of sides should be an... (by Chervil)
Need Help with a for loop
 
So for my code, I need to display a 12-month table. There needs to be 3 things on the table: the amount of interest that is needed to be paid, the principal tha...
[4 replies] Last: Yes. The first thing you need to do is compute the monthly payment. Th... (by dhayden)
Better Programming Skills
 
Hey guys. So I'm building a quiz/trivia game that takes a file of Q's and A's and formats them into a function. My program here works completely fine. My ques...
[2 replies] Last: Awesome thanks man. I actually never heard of the shuffle function. Th... (by sirconfusedalot)
Assistance in my assignment.
 
Hello, My instructor has given as a vector.h file, and she added "@todo" in them, where as we have to add or change things were ever it has a "///@todo" there...
[4 replies] Last: @Ispil First of, thank you for taking your time to help me. I expect... (by WhatHaveIChoosen22)
Class function help
 
I am working on an assignment for class and we are working with class and pointers. I think I have most of the program written but I am getting some errors - a...
[6 replies] Last: Chervil thank you very much. That helped solve my problem, didn't thi... (by chokra83)
My SFML program doesnt work.
 
Hello I have a weird problem when I start this program with no errors. Here is a picture of my window: http://imgur.com/Xt9secn I dont understand what is wrong?...
[3 replies] Last: Thank you Yanson. I cant believe I didnt notice that. My program final... (by Internet)
typecasting "auto" type?
 
Is there a way to perform a cast without explicitly specifying the type so that it is instead derived from the variable? char* data; data=athing; int rhubarb;...
[11 replies] Last: Right - I'm too used to MSVC std::string comparisons... Thanks again (by DrZoidberg)
by rantiv
Basic string manipulation help
 
The user will enter a string with a length of at least 5 characters. Next, the user will input an integer representing the starting index of a new sub-string ...
[1 reply] : Have you even tried to compile this? You have several compile errors. ... (by AbstractionAnon)
Counting a vector of strings
 
I have this exercise: the program receives as an input a .txt file where in the first line there is number of entries, the second line has the minimum number of...
[4 replies] Last: You seem to be unaware of the fact that std::vectors know their sizes.... (by jlb)
Condition variables | Simple producer consumer question
 
Hello guys, I'm having a look at some easy concurrent programming in C++ atm and having trouble putting condition variables into use. I have written a simple pr...
[no replies]
Performance issues: different compiler + mulithreading
 
I recently migrated a MSVC 2010 project to Rad Studio Seattle, primarily to slap a nice GUI on top of a console app. I have the old project's main() running ...
[5 replies] Last: Once again I spoke too soon. It's at about 30% now. I'll have a look a... (by DrZoidberg)
OuTPuT PRoBLeM
 
I am at basic learning level. i got a task of programming i have done it but the output is not well The program is supposed to print salary is 275 if we input...
[4 replies] Last: [quote=OP]I am using turbo c++ for my program that supports the syntax... (by Computergeek01)
printf or cout ?
 
My questions always seem to have a similar theme. Which should I use and why? printf seems easier to type ??? Thanks
[11 replies] Last: printf formats output to stdout http://www.cplusplus.com/reference... (by keskiverto)
by Ocen
identifier string is undefined
 
I am writing a class header file for a school project and intellisense keeps telling me that identifier string is undefined. I read in a previous post that usi...
[1 reply] : #include <string> (by TarikNeaj)
error: could not convert... (strings)
 
Dear community, I am new to C++, for practicing, I am currently working on some exercises I found on the internet: http://www.wsl.ch/fe/gebirgshydrologie/masse...
[5 replies] Last: Ah, yes, you're right - I should have known that ;) Thank you very mu... (by Madding)
January 2016 Pages: 1... 45678... 29
  Archived months: [dec2015] [feb2016]

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