General C++ Programming - March 2018 (Page 6)

Reading strings into an array and inverting the string
 
So what I did is create a program that will let the user input a file then it opens the file. What I need to do is take the input from that file and read a stri...
[3 replies] Last: I tried compiling it... what's wrong is that it's missing some pieces.... (by zaphraud)
Taking inputs from csv file
 
Hello I have a csv file which consists of numbers separated by commas, like the following: 0.6667,0.6668,0.6669........ 0.7773,0.7774,0.7775....... . . . . I ...
[16 replies] Last: Newer C++ standard support had to be enabled with a command line opti... (by jlb)
Keep getting Run-Time Check Failure #3
 
Happens at line 66 and it says "Run-Time Check Failure #3 - The variable 'sqFeet' is being used without being initialized." // Sergio Rogue-Garcia // Marc...
[2 replies] Last: PS. and if you used code tags when posting it will show the line numbe... (by SamuelAdams)
zero crossing
 
I have this code but is not working , it keep giving me the following errors : cannot convert 'float' to 'float*' for argument '1' to 'void zeroCrossing(flo...
[2 replies] Last: cannot convert 'float' to 'float*' for argument '1' to 'void zeroCr... (by kbw)
by jenxx
Matrix in a data file
 
Hi everyone I have a matrix like that in a data file: 0 1 2 0 3 4 0 5 6 1 7 8 1 9 10 1 11 12 2 13 14 2 15 16 2 17 18 I would like to transfor...
[3 replies] Last: Ah well, I'm glad you got it to work. FWIW this is what I hacked out ... (by lastchance)
ifstream read double from file
 
I'm trying to read a line of information from a file and I'm running into a problem while reading the double. I need the program to read and display the number ...
[5 replies] Last: You should check the return value of regex_match before using the matc... (by Thomas1965)
Looping help!
 
so I have my code and it works fine but I need it to be able to run for an infinite amount of employees or 0 employees. After the function is called for the fir...
[1 reply] : You haven't put a loop in. If you want your code to loop, you need to ... (by Repeater)
Which libraries or own engine
 
Hello. Earlier, I long chose the programming language for game development. In the end, I chose C++ and Java. I chose long between these two languages, in the ...
[2 replies] Last: I created text games. I want to go to 2d and 3d games. In MonoGame and... (by Jonikster)
Help with templates
 
I'm supposed to edit already built functions to make them into templates. This particular function that I'm having problems with is a constant member function o...
[2 replies] Last: At the very least, sequence<T>::value_type is a dependent name. You ... (by mbozzi)
Game : Dialog Box Text & Read Line Per Line
 
Hello I'm actually programming a game in c++ and SFML and I would like to know how to wright the text of dialog Box in my code (I'm french so I write original d...
[5 replies] Last: Ok thank you very much ;-) (by closed account zCpjy60M)
Can't print in created .txt file
 
Hello! This is my first time asking a question here, I don't know if there are any rules about posting, but there goes : I wrote a function in C++ to create ...
[1 reply] : The code to write your array to the file seems to be ok as far as I ca... (by Thomas1965)
Writing data list to output file
 
Hey guys, I am working on a program right now that will read customer info over to an invoice for an output file. The data I am reading is: George Washington...
[2 replies] Last: Yes, I am needing to write to an output file. (by EthanT24)
FCFS (First come First serve) not working properly
 
So did an FCFS for a project and for some reason, it not matching the grant chart that i need it to be. (link to grant chart) https://drive.google.com/file...
[no replies]
Const char* and Strings
 
I really do not understand how in the heavens does a char pointer be a string like "Hello" or something. Doesn't it have to be a reference to, well, a character...
[2 replies] Last: how in the heavens does a char pointer be a string It doesn't. A poi... (by keskiverto)
OOP
 
Hello! I am still in the middle of learning this language. According to me, and my experience, I find that this language is powerful and tough/hard. Is C++ o...
[2 replies] Last: Way back when I learned it, C++ was called a 'hybrid' language because... (by jonnin)
by Jmac21
Morning,created a Child and Parent Process to calculate grade averages etc. how can I combine them into one Concise Program?
 
I keep getting the error message " main.cpp:330:1: error: expected unqualified-id before '{' token { ^ But I feel likes there more errors than just that ...
[2 replies] Last: Do you use indentation to format your code, or is it as "flat" as what... (by keskiverto)
by asder
Create a clever Specker game player
 
I am creating a game called Specker in c++. The rules are simple: > There are p players (0 to p - 1) and n heaps (0 to n - 1) > > Starting with player 0 each ...
[5 replies] Last: Sounds better. With the # of players and presumably the # of piles an... (by jonnin)
Creating and writing to a file (Ofstream)
 
Write your question here. it a very simple question Turn out, im not very good with doing stuff like this for exporting data to a txt file, if you havent done...
[1 reply] : Your ending code tag is broken. It should contain a backslash. (by MikeyBoy)
Issue with counting ints in an array larger than input
 
Only allowed to use iostream library because thats is what the assignment says. i Agree. Vectors would be the bomb diggity here. trying to calculate the actual...
[3 replies] Last: int array1 ; int array2 ; When you first declare an array, it has u... (by Ganado)
How to use the ternary operator this way : defined(FOO) ? value1 : value2
 
hello there ! I often encounter a situation in which I do : #if defined(FOO) myfunc(0); #else myfunc(1); #endif This is tedious, and the du...
[2 replies] Last: hi Peter, Thanks a lot for your answer! Actually, I'm on a codebase in... (by codeaddict)
March 2018 Pages: 1... 45678... 15
  Archived months: [feb2018] [apr2018]

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