General C++ Programming (Page 5)

I need to know how to make one function that calls multiple functions. This is the code I have so fa...
[1 reply] : string f(const string & s) { string result = removeSpaces(s); ... (by cire)
Manipulation of strings
Thanks to it being the flu season, I missed my programming class today. Our teacher posted an assign...
[3 replies] Last: You have the return statement inside the loop so it only runs the firs... (by Peter87)
Writing a program that reads a list
The practice prompt is as follows: Write a program that reads the list /users/calendow/assignments...
[no replies]
by vinny1
bool functions
For the given input std::ifstream fin; // 'f'ile in - fin std::string filename = "fake.txt"; boo...
[3 replies] Last: #include <iostream> #include <string> #include <fstream> bool file_e... (by JLBorges)
Programme problem. Clases, gets and sets.
Hey guys, i have this code but i can't make it work as i want. I can't get past "Enter name: " . I n...
[2 replies] Last: Thank you for everything, it has been very useful. I have to say that... (by WareStrength)
by vinny1
My function isn't quite working
This function isn't quite working It should allow you to put text in a file, send the pointer back ...
[2 replies] Last: Also tellg, seekp and most other file position functions use a streamp... (by jlb)
Subtraction in a Linked List Calculator
My subtraction doesn't work. it gives me an illogical number that I can't identify how did it even a...
[2 replies] Last: Try something easy like: 12 - 3 then 3 - 12. Maybe // Don't use th... (by histrungalot)
Trying to Call on an Array
[3 replies] Last: FOUND THE PROBLEM BUT I DON'T KNOW WHY IT WORKS. I put lines 73 to... (by dualsymphony)
by bsc123
changing a char in a grid
I am making tic tac toe and I want to replace the numbers 1-9 with X's and O's. Is there a way I can...
[no replies]
Can't stop this function once it's started?!?
void blink(unsigned int interval_msecs, std::atomic<bool>& keep_at_it) { while (keep_at_it) ...
[4 replies] Last: if (key == 's') { (by cire)
nested for loop literal problem
consider the following loop(s) for (int foo(0);foo<t_max;++foo) { for (int goo?;goo<t_max;++goo...
[2 replies] Last: I had a bracket missing from the code that created errors with goo(foo... (by technologist)
by Cat32
Issues with constructors for class
I'm trying to write a program that simplifies fractions. The problems is that when I put in a denomi...
[1 reply] : Morning. It's because when you instantiate your Fraction you're callin... (by mutexe)
Segmentation fault
What's wrong with my code? Getting segmentation fault when trying to compile: #include <stdl...
[1 reply] : Since you pass an array of ints to qsort you can and should cast it to... (by Thomas1965)
Count all characters appearing consecutively. OUTPUT: The number of characters appearing consecutively and the letters.
Can someone help me in my code? When I input Committee the output should be 3 mte and it is correct ...
[5 replies] Last: You are very welcome. (by Thomas1965)
Text file into arrays
Hello, So I have to write a program which reads the text files into the arrays, and then is able to...
[1 reply] : First I would declare the arrays as in the instructions: Your progra... (by Thomas1965)
by bsc123
Replace char in grid
how can you replace a single character of a char grid. I am making tic tac toe and don't want to kee...
[no replies]
by vinny1
My code won't compile
I'm having trouble finishing these functions void PrintUsed and std::string FormatCarInfo This is ho...
[no replies]
Need help with problem in my source code
Heres the code #include<iostream> #include<cmath> #include<string> #include<istream> #include<iom...
[no replies]
Using for loop variable when inner exception occurs
Hello, Is it correct to use a value of variable 'x' from the for loop inside catch if exception occ...
[3 replies] Last: Yeah, that was a stupid question, I was too tired:) Rewrote it with wh... (by stridder)
Pages: 1... 34567... 50
  Archived months: [sep2015]

Cannot post in this page. To post a new message, go to the first page.