Hello everyone. I'm working on a program which should edit a text file by adding/deleting some specific lines. By default this text file doesn't have these specific lines, so the program will add them. But I also want it to replace them if they're already in the text file. Basically this is my idea: - Read the text file - Search the specific lines - If they exist then replace them - Else add them I pretty much know how to read a text file, how to search for specific lines, how to replace them and how to add them, …

Member Avatar
Member Avatar
+0 forum 4

So I've been working on this program for a while, I'm finally finish but I have two error that I can not understand why. My first error is when I am declaring the header f [CODE] //------------------- Mixed.cpp -------------- #include <iostream> #include "mixed.h" using namespace std;[/CODE]ile> it keep sending me an error message error C2143: syntax error : missing ';' before 'using' I feel like this is a real simple mistake but I can not figure out what I am doing wrong? There isn't suppose to be a ; before using my next error is about operator overloading I wrote …

Member Avatar
Member Avatar
+0 forum 3

I have been thinking about order operations and generalized * in Python recently. I want to share some of my thinking here, even the topic is quite theoretical, considering the beauty and orthogonality of the language. [B]Point one[/B] You can do comparison with tuples of numbers in Python [CODE]>>> (0,0)<(1,1)<(2,2) True >>> (0,0)<(1,1)<(2,0) True >>> [/CODE] First is fine for me, but I am not agreeing with the second one. Why? If a<b<c, then number b is between a and c in the number line. (x,y) is point in two dimensional plane. For me the natural extension of < is …

Member Avatar
Member Avatar
+0 forum 10

The End.