General C++ Programming - November 2010 (Page 4)

Visual Studio can't find log4cpp.ini file even if it's there
 
Hi to all, I'm developing a software by using log4cpp which was running without problem so far but yesterday I started to get "log4cpp.ini file not found" er...
[no replies]
by fukki
Create Pointer question
 
Hello, 1] what is the difference of int* a; and int *a; ? also 2] int *p; p=new int; is the same as int *p=new int; ?
[3 replies] Last: Nice, i will keep them in different lines. Thanks beginning and filip... (by fukki)
by fukki
Class constant question
 
Hello ! i study about stacks. i find that bool stack::top(double &item) const ; the parameter that is pass here is output parameter bool stack::pus...
[4 replies] Last: Yeah, i understand! Thanks Galik! . I found stacks very interesting.... (by fukki)
error C2679: binary '=' : no operator found in a const class method
 
When I change a class method to 'const', got the following errors. Any guru can help look into it ? Thanks in advance. error C2679: binary '=' : no operator...
[1 reply] : sorry solved. I just change the iterator to const_iterator (by henry1999sg)
#include & circularity
 
Hey. Here is the situation. File ControlCentre.h: #include "Receiver.h" ... class ControlCentre{ ... vector<Receiver> recs; ****ERROR Receive...
[2 replies] Last: Receiver doesn't actually need the implementation of ControlCenter bec... (by stravant)
C++ functions
 
Can I made some file only with functions,which I call from other programs?
[4 replies] Last: A simpler answer is: make a .hpp file with declarations of your functi... (by rocketboy9000)
Maze generation issues
 
I'm making a program that generates a random maze using the depth-first search algorithm. Problem is, when I run it, something goes wrong and it doesn't actuall...
[1 reply] : Hello? (by PiMaster)
Error in print function's display
 
I can not figure out why the print function will not print the month and day correctly in this program. The display when it is called is -858993460 for no matt...
[1 reply] : post your main(). getmonth and getdayofmonth could be done better: ... (by hamsterman)
reading data from files...
 
#include <iostream> #include <string> #include <ostream> #include <stdlib.h> #include <fstream> #include <string> #include <math.h> #include <stdio.h> #...
[2 replies] Last: yep.. thats exactly what i need.. thanks for very much... (by heathboy1986)
by Adidas
List inside a List...?
 
How do I manage to create a new list inside an exist list and keep the ability to get to the secound list threu the first list...? I want to use the <list> cla...
[9 replies] Last: um, where's the good old 'Person_using_the_Gas_station' gone? you d... (by coder777)
Using the OS's PATH var during system() call?
 
Hello, how do you read Wndow's path variable during the system() call? I've finally figured out how to chain together arguments during a system call using &, bu...
[4 replies] Last: I am trying to analyse memory of Stream cipher SNOW 2.0 using C++ any ... (by Lubi)
Nested conditional
 
I have a line of code which reads as follows: out << (j < 7 ? (i < 4 ? char(0xD1) : char(0xCF)) : (i < 4 ? char(0xBB) : char(0xBC))); I don't think it's n...
[1 reply] : 1) Given the way the machine code works only one of the i < 4 will e... (by stravant)
read and change time in .srt file
 
can anyone help me to change the time in .srt file wat i support to is increase subtitle time in 3 seconds(i.e the subtitle will after actors speaks 3 seconds)...
[no replies]
error C2146: syntax error : missing ';' before identifier 'CRITICAL_SECTION'
 
This is very strange. I just delcare a CRITICAL_SECTION cs_reconDB_query; in h file class RecConfiguration { private: static CRITICAL_SECTION cs_reconDB...
[1 reply] : strangely enough. somehow it is gone.. not sure what was wrong.. anyw... (by henry1999sg)
file open problem
 
do{ cout << "Enter 'File.txt' or 'exit': "; cin >> filename; if(filename == "quit" || filename == "exit")break; file.open(filename.c_str(),ios::b...
[1 reply] : If you read the file until the fail flag "failbit" gets set then that ... (by stravant)
Overload * Operator: Both Directions?
 
Hey all. I've overloaded the multiplication operator in my Matrix class (for scalar multiplication): Matrix<T> operator*(double scalar); //Scale matrix...
[4 replies] Last: You have to give argument values names to use them. struct Matri... (by Duthomhas)
by Johnla
fstream reading unseen characters
 
Hi I'm dealing with a text file which I'm reading and writing to, at some points I need to increase the characters on a line and in doing so shift everything a...
[2 replies] Last: Thanks for the help, I would prefer to do it by reading and writing to... (by Johnla)
Inserting into an array of set-s
 
I want to have many objects of stl::set, able access and insert in each of them. This could be partly done by vector < set<int> >. But when I want to insert...
[5 replies] Last: cool, I didn't know stl::swap, nice function with O(1) thank you bo... (by chemicus)
Random Number
 
okay when i just use: rand()%130 my random numbers are always the same when i close and open my program unless i restart my computer then they change. I unde...
[2 replies] Last: Thanks boss that did the trick (by snackysniper)
same name class in different cpps ?
 
hello, my question is, what will happen if i define the same name class(struct) in different cpp files in one project ? i.e: //a.cpp: struct Handler { s...
[8 replies] Last: the linker would start reading from left to right, the object files in... (by yanamandra007)
November 2010 Pages: 123456... 21
  Archived months: [oct2010] [dec2010]

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