Beginners - November 2017 (Page 16)

2D arrays
 
Hi everybody. I am quite new to arrays and I am not quite sure how arrays work. My goal for this post is to better understand how to prompt a user for a 2d arra...
[2 replies] Last: @whitenite1 This helped a lot thank you! (by restinpasta)
Calculating electric field, program returns #INF00
 
Hello. My school asked me to write a program that will take some arbitrary amount of charges in a 3d space, and calculate the electric field vector in a given p...
[4 replies] Last: Hi @OliwerElektryk, One or two other things that you might want to ti... (by lastchance)
Please Help
 
I cannot figure out how to code 110 to 120. What I have is what the output is supposed to be. I need to code it so that it will work with any .txt file. Any hel...
[3 replies] Last: Hello allysen331, Glad it helped. I just finished working on what I ... (by Handy Andy)
C++11 concurrency: tutorials, reading resources?
 
Hello I need some idiot-proof tutorials or books on the topic of concurrency in C++11 and later. The C++ Tutorial on this site doesn't even cover this and easil...
[2 replies] Last: I haven't read it but some of my friends recommend it. https://www.ama... (by Thomas1965)
getline not reading correctly
 
Hello all! Working on a project where I need to fill a file with numbers and use a getline to read those numbers line by line and then display the total, averag...
[1 reply] : A few comments. The test at line 14 if(myfile.is_open()) is redund... (by Chervil)
'i' does not name a type.
 
Can someone help me find the problem in my code ? #include <iostream> #include <fstream> using namespace std; void skaityti(int A , int B , double C , int...
[4 replies] Last: I fixed it somehow by deleting a few extra lines under my code. I have... (by Hackerman)
I can't seem to understand the bug in this code
 
Write a function that takes 3 integer parameters and returns the maximum value. #include <iostream> #include <conio.h> #include <iomanip> void ma...
[3 replies] Last: Now questions on logic: * If the main() receives and "answer" to q an... (by keskiverto)
Too many arguements
 
Every time I try to compile my code I keep getting an error stating that there are too many arguments in my function and I don't understand what that means or w...
[2 replies] Last: Line 6: Your function prototype for average() says it takes no parame... (by AbstractionAnon)
by Snacks
C++11 Threads
 
Hello everyone, disclaimer first - yes, this is a homework question. I didn't see a rule against posting those so I hope I'm in the clear. So, my task is to t...
[1 reply] : yes, this is a homework question. I didn't see a rule against posting... (by Enoizat)
Distribute soda by rules
 
Hello, I've been given a task to write a program which could output the biggest amount of soda that the guests of a party could drink. 'n' is the amount of b...
[5 replies] Last: What about describing us better what you're trying to achieve? From yo... (by Enoizat)
swap (vector overload)
 
Hello everyone. I have an unclear question as follows: In the tutorial about swap function (vector overload): Link here: http://www.cplusplus.com/reference/vec...
[1 reply] : Both work, but since the page that you link to is for the free (non-me... (by Peter87)
print the output to a txt file
 
how do i print this output to a text file instead of console window.i got this code also from this site. i do not want to change the function. only the output p...
[1 reply] : Hello dsblaster, At some point in the program you will have to set up... (by Handy Andy)
by Chaost
CopyFile Function does not accept any type
 
I'm trying to create a program that will copy a folder automatically every 240 minute (or every 4 hour). I found the CopyFile function would suit my needs. T...
[8 replies] Last: [quote=Chaost]When using this code, the "result" variable outputs "0",... (by Chervil)
Storing outputs as a character
 
The program I've written is a 24-hour clock that converts inputed time in to a 12-hour clock. My issue is that I can't get the program to show whether the time...
[1 reply] : In the second function (convertTime24to12) the data going out of the ... (by Chervil)
improve my code
 
Ugh, this forum seems to have infrequent posts (even less than the python forum which surprised me) which will make learning c++ harder. I'm from python and dow...
[9 replies] Last: Regarding the (char) cast, yes, @jonnin is right, it was already a cha... (by lastchance)
Programming Plagirisim Advice
 
Hi, I need an advice from experienced programmers and university students regarding plagiarism and academic dishonesty about programming projects. I was g...
[4 replies] Last: Thank you for sharing your stories and suggestions guys. My assignme... (by Kourosh23)
extract some integer data from a txt file (1,2)
 
i have txt file which i need to extract some specific integer data. it is as follows. i need a c++ code to extract only the integers mentioned below <Descripto...
[21 replies] Last: yes i removed. because it worked. there was some error in the input fi... (by dsblaster)
Multiplying elements in a row
 
How would I take the results from the random numbers generated here int main() { const int row = 10; const int col = 5; int arr ; srand(((u...
[1 reply] : looks like you need to go backwards. roughly for(r = all the rows - 1... (by jonnin)
If input is NULL
 
Im sorry this site doesnt allow me to format the code. Code works fine except I need to add this constraint. "If input is NULL, return -1". Im just wond...
[1 reply] : Hello donda97, Try adding this if (str.length() == 0) return -1; at... (by Handy Andy)
by cn00by
gettext define solution
 
Hello, i ve defined the error codes and text. now i want to use gettext to get the error text in dependence from the selected language. this example works ...
[6 replies] Last: Hello cn00by, You are welcome. Bitte schön. Glad it made sense to yo... (by Handy Andy)
November 2017 Pages: 1... 1415161718... 33
  Archived months: [oct2017] [dec2017]

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