Beginners - June 2017 (Page 4)

by H00G0
Access Violation when running compiled program.
 
Hello, (Being fairly new at C++) I'm having an issue with a program I'm writing. It has successfully been compiled and ran fine yesterday. However when I op...
Jun 23, 2017 at 12:08pm
[7 replies] Last: Thank you coder 777! (by H00G0)
by Dmtg93
Need help asap with programming homework with random number guessing game and math tutor program.. (1,2)
 
Hi there I have 2 programs I need help with for my class. One is a random number guessing game with a range between 1 and 100 with the range changing each time ...
Jun 23, 2017 at 11:49am
[32 replies] Last: Correct me if i an wrong Okay, consider yourself corrected. The s... (by jlb)
by sharbu
Sum of positive integers - Prints Garbage value
 
The program must accept N integers and print the sum S of all POSITIVE integers with the even positive integers reversed. Example Input/Output 1: Input: 4 39 ...
Jun 23, 2017 at 9:44am
[2 replies] Last: You don't reinitialise rev to 0 for each new positive even number. You... (by lastchance)
Calculator shut down
 
I am new to c++. I made a calculator and i "build and run" it and it worked perfectly. then I tried to run the program that was created by the compiler and when...
Jun 22, 2017 at 7:38pm
[3 replies] Last: The problem is when you ask the user for a number, s/he must insert a ... (by Enoizat)
adding two arrays using dynamic memory allocation
 
What's the problem with my code ... i am getting same value of sum in the loop. assumed m and n are equal i know theres logical error but assume they are same...
Jun 22, 2017 at 6:31pm
[4 replies] Last: because i am practicing pointers.... (by kaleemkhattak)
code abut session and time
 
need a dev c++ program does analyze an archive with the time of use from a platform of web. the archive have just 2 columns,first one identifier the user and th...
Jun 22, 2017 at 5:59pm
[2 replies] Last: There are a number of problems with the above code. The warning about ... (by Chervil)
How to distribute code in multiple .cpp files for readability
 
I have a .h file with many different functions related to the same function in the program. There are constants and constant arrays, they do go in .h file or in...
Jun 22, 2017 at 5:19pm
[2 replies] Last: You don't mention anything about classes. As jonin mentioned, the u... (by AbstractionAnon)
no match for operator << fstream
 
Hello fellas, i have this short commands what take 2 numbers from a file separated by a space (" "), and i get this error error: no match for 'operator<<' (ope...
Jun 22, 2017 at 11:18am
[2 replies] Last: I figured out the problem, i was using ofstream instead of ifstream... (by CosminPerRam)
HW problem, don't know how to proceed
 
I'm doing this for HW and I don't really know what to do now, there is also a menu function and a file input function. Can someone help me? Linda is starti...
Jun 22, 2017 at 9:45am
[2 replies] Last: a file input function I there a set of data you are expected to use?... (by Enoizat)
How to calculate sum of each row in 2d array
 
How can I calculate the sum of each row in an array and put it in a vector? For example x1 2 4 4 6 7 Sumx1=?? x2 1 2 3 4 5 etc x3 1 ...
Jun 22, 2017 at 3:06am
[2 replies] Last: # include <iostream> # include <vector> # include <algorithm> # inclu... (by gunnerfunner)
by Nakruf
illegal member initialization
 
Error C2614 'Ares::ObjectManagement::Entity': illegal member initialization: 'm_manager' is not a base or member class Entity { private: Man...
Jun 22, 2017 at 2:47am
[5 replies] Last: Where it is supported, #pragma once usually prevents the same file f... (by mbozzi)
Problem with 'system' function
 
I'm nearly a beginner when it comes to C++, so excuse me for any omissions or silly questions! Here goes.... Is there a limit to the size of the string you sen...
Jun 22, 2017 at 2:24am
[2 replies] Last: I will do that right away! Forgot about that stupid thing. Thanks! (by rush2112)
How to run commands on cmd prompt
 
All I need is to open cmd prompt as administrator and pass few commands to there. I already have: system("powershell -Command Start-Process 'C:\\Windows\\S...
Jun 21, 2017 at 9:14pm
[3 replies] Last: Ok, I think it's impossible to do this. I will just open my program as... (by Xzysiek)
conditions applied on while statement - Read Data Files
 
Hello everybody, this is my first time posting a question here, so forgive me if it's not in a way it should be. I try to ask my question in simplest and easi...
Jun 21, 2017 at 6:48pm
[4 replies] Last: jlb, I see what you're saying, I fixed it, thank you for help. (by Amirbdz)
How do I read a text file and add new line if value is different to value of next row
 
I need a code to read in text files and write a new line between lines where the value of the first column is different to the next. Any guidance on my current ...
Jun 21, 2017 at 5:40pm
[2 replies] Last: @gunnerfunner, I am afraid you are wasting your time. He is getting he... (by Thomas1965)
by Nakruf
can you deleting multple elements in vector in one iteration?
 
Is there a way to delete multiple elements by searching if the return value of a member function equals true. std::vector<std::unique_ptr<Entity>> entet...
Jun 21, 2017 at 4:22pm
[3 replies] Last: i get compile errors no way for anyone to know unless you state what... (by gunnerfunner)
easy sorting method
 
I think this is a simple function to sorting something. Is here any advices?? input data type is <int, int>. and input data is stored at source . i want to so...
Jun 21, 2017 at 2:05pm
[5 replies] Last: It would help if you explain how a tree is represented as a std::mult... (by JLBorges)
by Kuluoz
Create CRC-32 in read buffer
 
Hi friendz, I was read one file 50 bytes. the bytes exist in "unsigned char *buffer" varable. Now i want to create CRC-32 for 50 bytes. is it possible? pl...
Jun 21, 2017 at 1:18pm
[1 reply] : http://lmgtfy.com/?q=c%2B%2B+crc32+implementation (by AbstractionAnon)
Switch in simple calculator
 
I'm having trouble using switch in a simple calculator to use a certain operator based upon an imput and it won't compare. #include <iostream> using ...
Jun 21, 2017 at 11:59am
[6 replies] Last: @Ostrich, good job man! :) Sorry for my previous comment, just reali... (by Chris Longwood)
reading in and sorting a data file line by line
 
I have data files (named filename) with multiple rows of doubles separated by whitespace. I need to read the data file line by line, as attempted through the fu...
Jun 21, 2017 at 11:20am
[10 replies] Last: oh my holy days, dhayden, that's awesome, and hilarious. I was spendin... (by aengland)
June 2017 Pages: 123456... 16
  Archived months: [may2017] [jul2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.