Beginners - September 2018 (Page 15)

Convert string into array of char, CSV file
 
Ok so I'm reading from a CSV file and I have been reading the data with the getline function, I've converted the first three "strings" into integers which are p...
[3 replies] Last: heh, that is quite the mashup of what I said. -- c++ does not al... (by jonnin)
Loop through an array and sort the array?
 
I need to loop through this array given a data file and fill it, but while doing so make sure it is sorted in acending order. My issue is that my code loops and...
[4 replies] Last: jlmccart01, you need to write a sorting algorithm. This will give you ... (by tibrado)
by JM567
Read in file as string and store into struct variables
 
Hello, I am in a basic programming class, and we have a lab that I am pretty stuck on. The instructions are: "The object of this program is to rearrange the dat...
[19 replies] Last: @lastchance, looks perfect now -> 100% (by Thomas1965)
Strange vector behaviour
 
I don't understand why I see lines marked with arrows in console. I added c1 and c2 to vector with std::move. But when I was adding c3 and c4, I got extra copy ...
[2 replies] Last: > But when I was adding c3 and c4, I got extra copy constructor callin... (by JLBorges)
by RahRah
Stop program at a certain temperature
 
I should write a program that asks for temperature and say that a temperature of 42 will stop the program. this is what i have so far i am not sure how that is ...
[9 replies] Last: > what i dont understand is do i do this in main or in the function A... (by JLBorges)
From a For Loop to a While Loop
 
Hello. Beginner here on MATLAB. How do I change this for loop I made into a while loop and get the same result? x=6*rand(1,10)+2 for i=1:10 if i<5 ...
[2 replies] Last: Oh, ok. Sorry about that. Thanks! (by ITOYEN2049)
Differentiating even and odd integers
 
I've been trying to expand my grasp on c++ lately, and today I decided I was going to see if I could write a program that could tell the difference between odd ...
[3 replies] Last: missing ; on line 18. any compiler including the one built into the fo... (by jonnin)
larger numbers wont print out correctly
 
So i have a problem where large numbers wont print out correctly. I tried debugging and the number is said to be 657901841 it is gotten from adding all numbers ...
[4 replies] Last: I think i fixed it! thanks for the help! (by chang123)
by Yertuu
Windows Script in C++ Issue
 
Very quick question. Tried asking google but haven't come across anything that has help. I'm writing a c++ program and can't get this one line to run, please ex...
[13 replies] Last: you can write the batch file from your program, which ensures securit... (by BoldAsLove)
Non recursive merge sort for linked list
 
I thought about two concepts which come from sorting files because both linked lists and files has sequential access Straight merge Nodes from orig...
[9 replies] Last: Ive done the reverse (build the 'list' from a vector where 'pointers' ... (by jonnin)
by flagex
Problems with pointer arithmetic
 
Hi guys! I've recently began studying pointers, but I've hit a big roadblock. To my understanding, once "p++" is executed, p should point to the next memory loc...
[3 replies] Last: honestly, I wouldn't use it, which may be why you have not heard of it... (by jonnin)
by Yertuu
Video Alarm Clock Issues
 
So, I'm writing a little program to select a random video file located anywhere on my C:\ and play that video after a timer countdown has reached zero( I plan t...
[2 replies] Last: @Thomas1965 The problem is nothing to do with the .bat or the .exe. ... (by Yertuu)
by Fortem
Newbee
 
HI guys! I need a lil help. Im new at C++ Programming and Im stuck at creating a simple program that will have this output: if i enetered any word say alpha, i...
[4 replies] Last: #include <iostream> #include <string> int main() { // std::strin... (by JLBorges)
by Manga
help with ugly code
 
This function treats two strings like they are ints and adds them. But the code looks long and has too many temporary variables for my liking. It is also confus...
[10 replies] Last: Yes! That did it repeater. Thanks!! (by Manga)
Inheritance related confusion
 
If a base class is publicly inherited ,member functions of derived class(inherited member functions from base class or member function of derived class) can acc...
[5 replies] Last: Followup to the previous test case, with private inheritance: class D... (by keskiverto)
by Zaglah
Loop won't end help
 
Hi everyone, long time reader first-time poster but I don't get why this loop won't end. I've tried everything for the last couple days that I can think of, bas...
[6 replies] Last: Monster should HAVE health. Monster should CONTAIN a health value. A m... (by Repeater)
General Protection Exception error.
 
Hi! I was trying to make a hashing program. There was no error while compiling...but when I run this I get an 0X2507:0X00DA Processor fault. What is this error...
[5 replies] Last: Also, if you're going to build a char array to be displayed, you need ... (by Repeater)
by RahRah
How to use a certain temp to exit
 
Write your question here.
[1 reply] : Hello RahRah, Welcome to the forum. The problem here is that you did... (by Handy Andy)
Read from file, sort in array alphabetically, display array names and count of each name
 
Hey guys. I'm still pretty new to coding so I'm a little confused on where to go from here. So what I have is basically the code to open the text file, but I d...
[3 replies] Last: What does a name in the file names.txt llok like? Could Jorge Francis... (by JLBorges)
Problem in header file and variables
 
Hi! When i run the codes, in turbo c++, from the resource, i've got the message it says: 1.) error edit: unable to open include file 'RW/RANDOM.H' 2.) error ed...
[10 replies] Last: Thank you for your response sir. Somehow, i understand some of those t... (by daryledevs)
September 2018 Pages: 1... 1314151617... 20
  Archived months: [aug2018] [oct2018]

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