Beginners - February 2016 (Page 5)

Already defined object?
 
I am having trouble with multiple definitions of a class within a header file. The error says: LNK2005 "public: __thiscall Shape::Shape(void)" (??0Shape@@...
[2 replies] Last: That did it! Thank you so much. I didn't think to try to just define i... (by curseofcj)
array
 
hi, i need creat two array and join them into one (third array) To creat a third array have erore. Help me please. #include <iostream> #include<iomanip...
[2 replies] Last: #include <iostream> #include <iomanip> using namespace std; int ma... (by Thomas1965)
by tyooo
Hollow Hourglass printf in C
 
Hello, i'm new / bad at programming and I know the program is messy and all but I was just wondering if anyone knew how to make the two sloped lines intersect e...
[1 reply] : r = row s = space a = asterisk (by tyooo)
Total rainfall program error check; Did I write the code correctly?
 
I've developed a program (with the help of other post from in other forums on this site) to take the rainfall for the 12 months in a year and calculate the tota...
[2 replies] Last: OK, valid points, reading them like this makes perfect sense. I didn'... (by a1ckunze)
by WhatIf
How to get the memory address of an object stored inside an array?
 
Hi, I'm trying to create 4 objects of Student on the heap and store them in the pupil array. How do I print out the address of the object contained in the ar...
[4 replies] Last: if you mean real memory address you need dos or maybe win 3.x i dont ... (by alexeyn)
by nibitw
Not printing
 
Hello everyone. My code runs almost perfect, expect it wont print out the report marking, the first input by the user(you can see my execution results on the bo...
[1 reply] : Lines 8 - 18 private: string reportingMark; int carNumber... (by jgg2002)
by KTlady
CIA password
 
Hi, I need help I am creating a code that allows the user to enter a password must be six digits long and the sum of the digits must be a prime number. Here i...
[3 replies] Last: There is another way of doing this, which might be considered a little... (by jgg2002)
Return error if variable exceeds maximum limit
 
I've created a class named shape, and it's working perfectly, but I'd like to implement a new feature. When the user enters a value bigger than the data structu...
[no replies]
by tlark
Open file, print content
 
I need to open the file flowers.dat (i think I got that part right) In the body of the loop I need to print name of each flower and where it needs to be grown (...
[9 replies] Last: I fixed those mistakes #include <fstream> #include <iostream> #incl... (by tlark)
How to return the max element in vector
 
Ques in Programming and principles in c++ ch 8 10. Write a function maxv() that returns the largest element of a vector argument. What i tried..(not work) #...
[3 replies] Last: Thanks for replies, you people are very helpful. (by ephraimr)
by hasu
Question about count/for loop
 
Question: The user is prompted to enter number of times to repeat the generation of the two numbers.Thetworandomnumbersarebetween0and100. Thethreepossiblesce...
[15 replies] Last: Thank you both TarikNeaj and JLBorges so much for your time and help, ... (by hasu)
A question about runtime
 
Hello I am a relatively new at C++. I use Visual Studio 2008. The first thing I found out about Visual Studio is that to run a program on another computer, you ...
[2 replies] Last: you need static linkin push active config to Release Project ... (by alexeyn)
by Akrone
My first program !
 
Hey ! I have made my first stable program, does somebody have any suggestions or tips to improve my program ? This is my code : #include <iostream>; #...
[7 replies] Last: There is an example here showing you how to use it - http://en.cppref... (by TarikNeaj)
pointers, arrays and simpletron
 
Hi I am having trouble getting my simpletron to add two numbers and output the result. it is meant to be an exercise in pointers and arrays. I can't see where I...
[1 reply] : bump 😜 (by jamesfarrow)
String concat
 
How to Insert a string inside of another string from any position and print it. Without using string header file or functions.
[2 replies] Last: I came up with this.... String 2 is perfectly copying in string 1 in a... (by faadshahrukh)
Creating 2d array
 
Hi there, Just started learning C++ and would like to ask here how do i start when 2d array is used to convey this information int stalls = {{1,0,0,0,1,...
[5 replies] Last: The heading text is straightforward. open/close - you could use an i... (by Chervil)
by basedg
While loop
 
HI guys! So I have to create a word search and word count program. I inputted the text (I know that its long and kind of a weird way to put it but my instructor...
[1 reply] : You can do it like this: declare variables pos and startpos, count as ... (by Thomas1965)
2D arrays
 
I'm working with 2D arrays. I'm reading information from a text file and printing out the information, also attaching that info to a 2D array. I need to calcula...
[2 replies] Last: I would do it like this: #include <iostream> #include <string> #incl... (by Thomas1965)
by Bopaki
Getting an error when trying to compile
 
Write your question here. I am trying to compile an example program from a book by Walter Savitch and get an error about the iterator and a namespace. 12 25 E...
[2 replies] Last: It worked, Thank you very much!!!! (by Bopaki)
Recursive output won't reset count.
 
My program keeps counting the permutations even after the second input. Enter a string to permute ( to exit): 1) bac 2) bca 3) abc 4) acb 5) cba 6) cab ...
[no replies]
February 2016 Pages: 1... 34567... 46
  Archived months: [jan2016] [mar2016]

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