User Profile
Collapse
-
So, no one can help me? -
Another problem with the same program as before
I fixed the operand problem (thanks) and now a new one has risen up. I have to compile it with a makefile which I have made and I am getting more strange errors I don't know how to fix.
Well, first of all, I don't know how to open a file in one function and use the same ifstream in another function in a separate file.
And second of all, I keep getting the following error:
...Code:Undefined
-
void count(frequency , int&, int&);
void print(frequency );
Those are the prototypes. Frequency is a struct in a header file.Leave a comment:
-
Frustrating syntax problem
At this point in life, I thought syntax wouldn't be a problem, but it is. I'm trying to write yet another school program, but keep getting compile errors in the main function when I try to pass an array of structs to any other function. The error is operand expected instead of ",", and at this point I've managed to get it down to one error. What am I doing wrong? I've tried everything. Here are the two lines in their current form:
... -
Latin Square algorithm problem
Hey again,
I'm trying to write a program that will output a random valid Latin Square (9x9 square of numbers 1 - 9 with no repetition in the rows and columns) and can't get my numbers to not repeat. I figured that the code I have now would be enough, but it doesn't seem to be working. Could somebody help me out?
#include <iostream>
#include <ctime>
using namespace std;
int main(){... -
-
Windows file paths in fstream...?
Hey,
In my spare time, I've been programming things that require opening files on a windows machine. I know in Unix the <name of file>.open("<pa th">); command will use the directory given, but it wont seem to in Windows. I keep getting errors when I try to do anything like inFile.open("C: \Myfolder\myfil e.txt"); What am I doing wrong? -
-
"Error: Could not find a match for" is the bane of my existence right now
Hello,
I am trying to write a program that opens a file; reads through it; outputs the text; then outputs the number of lines, words, and characters.
Problem is, every time I try to compile, no matter what modifications I make, I get an error, "line 42: Error: Could not find a match for std::basic_istr eam<char, std::char_trait s<char>>::get(i nt)."
I have tried everything I can think...
No activity results to display
Show More
Leave a comment: