Here is my problem:
I have a struct:

struct point
{
    int x;
    int y;
};


and then I have an array:

for (int i = 0;i &lt; n;i++)
{
    arr[i].x=rand() % n + 1;
}


I defined the quicksort function as follows:

 void quicksort(int *a, int left, int right);


and I want to sort the point by X coordinate, so I call the quicksort:

quicksort(arr.x, 0, n-1);


And this is the error message:


  error: request for member 'x' in 'arr', which is of non-class type 'point [(((unsigned int)(((int)n) + -0x000000001)) + 1)]'


Sorry if the question is too stupid or badly formulated, the truth is I'm a newbie and I'm really willing to learn as much as possible and I'd be very thankful for your help!


Question: Is UX better marketing than marketing?
Answer: I'll start this answer with a quote from Richard Reed, co-founder of Innocent Smoothies (the fruit drinks): 
"90% of our marketing strategy goes into the bottle." 

Innocent is not a digital company though - the point is that they invest a lot into the product quality.

Marketing is way more efficient (aka delivering better conversion rates) if the promise made in the marketing messages (usually: "Our product is great") is kept by the product itself. And many successful digital products distinguish themselfs by great UX.

I've seen products failing presumeably due to bad UX, even though great marketing efforts have been made. And I saw products failing that had great UX - some because of a mismatch in product-market-fit. Some failed because the world never got to know about the product, as a result of the absence of good marketing, PR etc. 

That said, I think a valuable product with a great user experience is the precondition for efficient marketing and makes the job of marketing much easier. The ROI of marketing activities for a good or great product is certainly higher than for bad products. 

Back to the Innocent example: 
Customers loved these smoothies and since they loved them so much, they would tell their friends, and they would buy them too. This is word-of-mouth marketing and the same holds true for great digital products, which we usually call "going viral".

My summary: 
Spend your budget on building a valuable product with great UX first and safe a part of the budget to do marketing then - as a result the ROI on the marketing budget spent will be much higher.