
please wait
by Sevrene
Proper use of ifstream and Funtions
|
This is the code I've attempted to use: /************************ Purpose of the Program: Read an input file for gene information and sort the informatio... |
Apr 8, 2018 at 1:04am
[3 replies] Last: It's kind of silly to have a function just to open the file. Instead, ... (by tpb)
|
by ETlinny
Access to private class members
|
Hello there, I am a complete new beginner here. I am trying to load a .txt file which contains a few variables and display them. I am not sure how to access pri... |
Apr 7, 2018 at 11:48pm
[10 replies] Last: string File; for (int i = 0; i < 4; i++) if (myfile >... (by keskiverto)
|
by abir50
what am i doing wrong here?
|
I am doing a project for class and since I am not allowed to share/post it so i made an example of the part that I am stuck on. Idk what i am doing wrong here..... |
Apr 7, 2018 at 10:35pm
[5 replies] Last: damn i didn't even realized i had that, must have done it by accident,... (by abir50)
|
by waffle267
Vectors and Classes
|
Currently in c/c++ programming 2 and trying to expand my knowledge of classes and vectors and how they interact with each other. I'm experimenting with using a ... |
Apr 7, 2018 at 8:40pm
[11 replies] Last: A free function is just a non-member function (outside of the class) ... (by jlb)
|
by BambiWithPMS
Should I used “dynamic allocating array” or “Vector”?
|
just read about Vector and it’s basically an improved array? |
Apr 7, 2018 at 5:51pm
[2 replies] Last: Hello BambiWithPMS, Yes this is true. At its core it is still an arra... (by Handy Andy)
|
by One Pea
Ignore
|
Please ignore |
Apr 7, 2018 at 5:24pm
[1 reply] : Please do not post multiple times. http://www.cplusplus.com/forum/beg... (by closed account E0p9LyTq)
|
by averyniceguy
Question regarding switches, I think.
|
This is a snippet of a program I'm working on. The idea is that it switches between active and not active every time a password is entered. Could you show me a ... |
Apr 7, 2018 at 4:52pm
[3 replies] Last: I do not understand the necessity of bool if I can use int. Using ... (by closed account E0p9LyTq)
|
by aaronpeart
Delimiter not working
|
For a project I have to pass data from a file into an HTML code. The delimiter is not working (\t) instead of selecting all data between tabs, it selects only s... |
Apr 7, 2018 at 3:25pm
[6 replies] Last: Hello aaronpeart, While I was playing with your program I realized th... (by Handy Andy)
|
by abir50
counting primes between 1 to x
|
Trying to get pi(x)=number of primes from 1 to x but i am totally lost after getting up to here. #include <iostream> #include <cmath> using namespace st... |
Apr 7, 2018 at 2:49pm
[6 replies] Last: You should probably increment the count, not just assign 1 to it. (cou... (by Ganado)
|
by ouzounisg
What are strings?
|
I just started learning c++ without any previous experience in programming and i am quite baffled as to what strings actually do or where they are used. |
Apr 7, 2018 at 2:19pm
[1 reply] : It's best to think of a string as a sequence of zero or more character... (by JLBorges)
|
by abir50
void test function
|
For a project i am asked to find primes from 1 to x and then use the number of primes to solve the Prime number theorem, which i did but prof doesn't want us to... |
Apr 7, 2018 at 1:37pm
[3 replies] Last: This description matches the given output: // Loop i from 1 to n. In ... (by dhayden)
|
by bonecrunch
Problem with M_PI
|
Hello I need some help with this code. I got this expression: M = 4/3(p*pi*r^3) where p is a constant. pi is also a constant, and to define it I used M_P... |
Apr 7, 2018 at 11:59am
[2 replies] Last: oh! thanks helios ! (by bonecrunch)
|
by beginner1127
c++ problems updated!
|
I think there is something wrong with my constructor. Can someone please help?? #ifndef INTEGER_SET_H #define INTEGER_SET_H class IntegerSet { priv... |
Apr 7, 2018 at 5:35am
[2 replies] Last: You need to set the A's elements to 0 in the constructors. Something l... (by tpb)
|
by BoomMan
Reading file into a class array
|
For my homework assignment, I have to create a class titled "Book" and I need to read a file, of a max size of 2000 lines, line by line into the class type belo... |
Apr 7, 2018 at 4:16am
[5 replies] Last: since you have various types of data for a single book I would suggest... (by closed account NCRLwA7f)
|
by ElleJay
How to use in.get() with text file
|
I'm writing a program that reads in words from a text file into a stack and queue to check if they are palindromes. Here is the text file: madam Madam I... |
Apr 7, 2018 at 3:27am
[5 replies] Last: I'm only to use characters, not allowed to use string type at all (by ElleJay)
|
C++ to Assembly code |
hello everyone, does anyone know how I can start a c++ program and drop down to assembly code for a few functions and pick right back up to c++? so, for exam... |
Apr 7, 2018 at 2:07am
[2 replies] Last: yes, This is good, I didn't know what it was called....I was under the... (by closed account NCRLwA7f)
|
by One Pea
Counter returning 1 more than expected
|
This code counts all the names on a file. There are 26 names in the file, all on separate lines. However, the counter returns 27. #include <iostream> #includ... |
Apr 7, 2018 at 1:58am
[2 replies] Last: Yeah you were right there was an extra blank line at the end, thank yo... (by One Pea)
|
by ozamsey10
Add AI to Tic Tac Toe
|
Hey, I need to make it so that my Tic tac toe board is against the computer rather than against another person so can anyone help me with how I should edit my ... |
Apr 6, 2018 at 9:33pm
[4 replies] Last: Also, try to make everything relative to the size of a side. I could ... (by icy1)
|
by Fishy
Why wont this very simple program with classes and files compile?
|
Why wont this very simple program with classes and files compile? This code is from a YouTube tutorial. I'm using Code:Blocks 16.01. The code has three files.... |
Apr 6, 2018 at 8:11pm
[4 replies] Last: I went back and watched things again including how he created projects... (by Fishy)
|
Having some linker problems with gcc... |
Hello! I'm having some trouble getting my program to compile. The purpose of this program is: 1.) To generate hour/temperature values and store them in a ... |
Apr 6, 2018 at 7:30pm
[4 replies] Last: also when you compile be sure to list all the .cpp names: g++ -std=c+... (by nether)
|