comment should explain what im trying to accomplish...not sure how i should approach this problem tho

fileWork::fileWork(const std::wstring& processName,const std::wstring& fileName) // i want to use initializer list, but how can i do so if i want the function arguments to be checked first...before any class members are initialized? is this not possible or any ideas?
{
	isValidProcess(processName); 
	isValidfile(fileName);

	this->fileName = fileName;                                     
	this->processName = processName;
	memoryAddress = NULL;
	
	
}

Do the functions isValidProcess() and isValidfile() throw exceptions if they find something amiss?

It should do no harm to set this->fileName, which is just a string, to fileName, and then do the check afterwards. If the check fails you can always reset the variable.

Why do you want to use an initializer list? Your code presumably already works, and since you're trying to do something fairly complicated with logic involved, the code would probably be more understandable as it is.

(Initializer lists can be slightly more efficient, yes, but the difference is so small that you shouldn't worry about it.)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.