Is it possible to tell the Qt MOC that I would like to declare the class and implement it in a single file rather than splitting them up into an .h and .cpp file?
We are in web era standalone applications are almost gone everyone wants their internet application to run inside browser, programming languages like Ruby, Python and scala are becoming more and more mainstream.
Sometimes I wonder what these programming language offer which make them top choice of IT companies, if I plan to become a freelance web developer is it worth learning C# or Java. I read beginner's book for both of them, but to master any of them require some time investment.
Hi all,
I am a beginner in .Net development. I need to ask about .Net winform deployment.
If i have 1 exe file, some class libraries, and 3rd party components (DevExpress).
Should i install these Dlls (class library and 3rd party component) in the GAC (Global Assembly Cache) in client computers ?
Thank you for the explanations.
I am a beginner in image processing. I want to write an application in C++ or in C# for
Searching an image in a list of images
Searching for a particular feature (for e.g. face) in a list of images.
Can anybody suggest where should I start from?
What all should I learn before doing this?
Where can I find the correct information regarding this?
I am just starting with cpp and I've been following different examples to learn from them, and I see that buffer size is set in different ways, for example:
char buffer[255];
StringCchPrintf(buffer, sizeof(buffer), TEXT("%s"), X);
VS
char buffer[255];
StringCchPrintf(buffer, 255*sizeof(char), TEXT("%s"), X);
Which one is the correct way to use it?
I've seen this in other functions like InternetReadFile, ZeroMemory and MultiByteToWideChar.
How print format string passed as argument ?
example.cpp:
#include <iostream>
int main(int ac, char* av[])
{
printf(av[1],"anything");
return 0;
}
try:
example.exe "print this\non newline"
output is:
print this\non newline
instead I want:
print this
on newline
I have a rather simple C++ project, which uses boost::regex library. The output I'm getting is 3.5Mb in size. As I understand I'm statically linking all boost .CPP files, including all functions/methods. Maybe it's possible somehow to instruct my linker to use only necessary elements from boost, not all of them? Thanks.
Hi,
In the Makefile.in of an existing project, it has this:
EXPORTS = \
gtkmozembed.h \
gtkmozembed_glue.cpp \
gtkmozembed_internal.h
Can you please tell me what does EXPORTS mean?
Thank you.
What Could be the example scenarios to declare any class or any method as "final"? When do we need to do this?
Please give me some example to understand the practical use of "final"...
please guide me as I am a beginner in OOP
I know how to use comma in printf as grouping separator to print value in format like
1,000,000.00
to print it that way I'm using command
System.out.printf ("%,.2f", value);
but how to use space as grouping separator to format value like
1 000 000.00
I tried to find solution but solutions with using DecimalFormat look at now to complicate for me (beginner level). Is there as easy way as in example with comma to do it?
i see lot of struct code like below
struct codDrives {
WCHAR letter;
WCHAR volume[100];
} Drives[26];
we can use variables or array something like that to store the data..
but i am not sure why use struct in the programs.
i am beginner so please for my dump question
Thank you for the time spent to me
Here is a simple header file for six different programs that used to work right, but then my files also include other files. This needs to get changed so that if the dependencies change the files that include those dependencies get updated.
all: load list show add delete btree
%: %.cpp
g++ $< -g -o $@
Possible Duplicate:
The Definitive C++ Book Guide and List
What is the best text book a beginner (non-CS major) can buy to master C++? And for Java?
Thanks
I have a list L of objects (for what it's worth this is in scons). I would like to create two lists L1 and L2 where L1 is L with an item I1 appended, and L2 is L with an item I2 appended.
I would use append but that modifies the original list.
How can I do this in Python? (sorry for the beginner question, I don't use the language much, just for scons)
In C++, the common practice is to declare functions in header files and define them in cpp files. This leads to always having two copies of every function's prototype. Then whenever I want to change a function's name/return value/parameter, I have to manually change it in both files. This seems unnecessarily tedious and there must be lots of people that share my pain, so is there a way to automate these changes between files in VS?
Bonus points for vim solutions as well.
I am a beginner in UNIX. I am finding some difficulty in input/output redirection.
ls -l temp
cat temp
Here why temp file is shown in the list and moreover, it is showing 0 characters.
wc temp temp
cat temp
here output is 0 0 0 temp.
Why lines, words, characters are 0.
Please help me to undestand this concept.
If I have no to little experience in either of them, but know enough Java and Ruby to be comfortable, is one framework harder to learn than the other? Is one easier to use for the beginner on these?
I know it is hard to answer. Just looking for general thoughts on it.
Any ideas why Xcode wont let me define a c++ class in my cocoa project?
I am trying to use a C++ class in my cocoa project but I am getting build errors just creating the c++ header file.
class SomeClass{
public:
int count;
}
Expected '=', ',', ';', 'asm' or 'attribute' before 'SomeClass' in .....
If I remove all code from the header file, ?the cpp file builds without any errors and is included in the list of compiled sources...
hi,
i made a class named x;
so i want to make array of it using dynamic allocation
x [] myobjects = new x();
but it gives me that error
Cannot implicitly convert type 'ObjAssig4.x' to 'ObjAssig4.x[]'
i know it's dump question but i am a beginner
thanks
Let's take for example a single file committed in CVS with the following history.
test.cpp
rev 1.1
rev 1.2
rev 1.3
How do I revert to rev 1.2 discarding the changes in 1.3 and then continue to make modification from that point on?
Although you wouldn't want to do this, if you have a namespace COMPANY, and a class in that namespace SOMECLASS. Why is it that in the .cpp file, you might define the functions as
COMPANY::SOMECLASS::someFunction()
{}
But in main, you don't do
int main() {
COMPANY::SOMECLASS::someFunction();
}
but instead you declare the namespace and do something like:
using COMPANY::SOMECLASS;
int main() {
someFunction();
}
In a .cpp file, if I decare a constant as follows:
namespace
{
const int UDP_PORT_MIN = 1024;
const int UDP_PORT_MAX = 65535;
}
vs. just:
const int UDP_PORT_MIN = 1024;
const int UDP_PORT_MAX = 65535;
What's the difference between these two?
I often see constant definitions declared in an unnamed namespace, so I was wondering what's the purpose of the unnamed namespace in this context?
Hi All
Visual studio allow you to create "inlined" classes (if I am not mistaken with the name).
So class header and implementation all in one file.
H. file contain definitions and declarations of the class and functions, there is no .cpp file at all.
So I was wondering if there is any penalty for doing it that way? any disadvantages ?
Thanks a lot
Hi
I'm a beginner programmer, pretty new 2 it
Basically is there any alternatives to the print statement for output in Python, and how can I format my output text to be color-coded?
Thanks
Suppose I want to write my own preprocessor.
So I want something like this:
all *.cpp and *.hpp (even the included ones), before they go to g++, they go:
file --> my preprocessor -> g++
Is there a easy way to do this in the LLVM framework? i.e. to add in a stage that says: "after you load up the source file, pipe it through this program before compling it" ?
Thanks!