declaration Questions
4
Solved
a template parameter can be used in another template parameter that follows it this way :
template<typename T, T N>
struct s
{
};
But is it possible to reference "T" if it is declared afte...
Influx asked 18/9, 2009 at 22:48
10
Solved
In Stroustrup's The C++ Programming Language: Special Edition (3rd Ed), Stroustrup writes that the declaration and initialization of variables in the conditionals of control statements is not only ...
Ouachita asked 4/10, 2009 at 17:20
9
Solved
Is there any way to do this in a condensed form?
GLfloat coordinates[8];
...
coordinates[0] = 1.0f;
coordinates[1] = 0.0f;
coordinates[2] = 1.0f;
coordinates[3] = 1.0f;
coordinates[4] = 0.0f;
coor...
Lima asked 20/8, 2010 at 22:55
2
Solved
I just noticed that int arr2[(777, 100)] is a legal array declarator, while int arr1[777, 100] is not.
A more verbose example for compiling would be this
#include <stdio.h>
void f(int i) {
...
Damper asked 6/4 at 3:54
7
I'm a beginner and I'm doing an exercise following a book. Below is my code and i got this
"Missing partial modifier on declaration of type 'Windowsform.Form1'; another partial declaration of thi...
Consume asked 12/10, 2012 at 20:14
6
Solved
My project consists of only two source files:
a.cpp:
const int n = 8;
b.cpp:
extern const int n;
int main()
{
// error LNK2001: unresolved external symbol "int const n" (?n@@3HB)
int m = n;...
John asked 15/2, 2013 at 12:24
10
Solved
I want to declare a variable in SQLite and use it in insert operation.
Like in MS SQL:
declare @name as varchar(10)
set name = 'name'
select * from table where name = @name
For example, I will ...
Eyler asked 12/10, 2011 at 11:34
13
Solved
How do I understand following complicated declarations?
char (*(*f())[])();
char (*(*X[3])())[5];
void (*f)(int,void (*)());
char far *far *ptr;
typedef void (*pfun)(int,float);
int **(*f)(i...
Olshausen asked 19/9, 2009 at 16:8
3
Solved
should I use
bool __declspec(dllexport) function()
{
return true;
}
or
__declspec(dllexport) bool function()
{
return true;
}
what is the difference between these two?
Will this affect ...
Inmate asked 28/11, 2012 at 20:31
19
Why is volatile needed in C? What is it used for? What will it do?
Mascot asked 29/10, 2008 at 8:36
9
Solved
I've seen this answered before, but they don't seem to cover this specific use case (or they don't work/help)
import {Route} from 'vue-router';
export const detailRoute = {
path: '/detail/:id',...
Newly asked 10/5, 2017 at 18:21
5
This is tiny snippet of my code.
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <time.h>
#include <sys/stat.h>
#include <sys/wait.h>
...
Higinbotham asked 29/3, 2011 at 5:37
15
In an Eclipse SVN project I have a problem; when I tried to open a declaration of one class, I got this error:
Problems opening an editor Reason : projectname does not exist.
Also refactoring d...
Admix asked 8/1, 2013 at 1:45
15
Solved
I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.
How about these examples:
int...
Gasiform asked 7/10, 2008 at 21:2
5
Solved
I like the fact that Go doesn't give me a million ways to do simple things – to borrow from The Zen of Python, “There should be one – and preferably only one – obvious way to do it.”
However, I'm ...
Shimmery asked 11/7, 2013 at 23:48
3
The C23 standard apparently has introduced using "auto" keyword for auto type deduction, see here, just like in C++11. However, there seems to be some differences.
According to here, http...
Fyrd asked 14/5, 2023 at 17:33
20
Solved
What's the real difference between declaring an array like this:
var myArray = new Array();
and
var myArray = [];
Tidy asked 31/5, 2009 at 11:23
3
Solved
In The C Programming Language, 2nd Edition, by authors Brian W. Kernighan and Dennis M. Ritchie, they talk about declarators and direct-declarators. The discussion starts in the book on p. 122 with...
Ashes asked 1/2, 2023 at 18:14
10
Solved
Is it possible to declare a variable in c++ without instantiating it? I want to do something like this:
Animal a;
if( happyDay() )
a( "puppies" ); //constructor call
else
a( "toads" );
Basial...
Feckless asked 29/4, 2009 at 0:16
3
Solved
I'm writing a typescript function that accepts a numeric array (i.e., type: number[]) and calculates its mean. In addition, I want to account for when the input array might contain some null values...
Apply asked 3/3, 2022 at 9:0
3
Solved
I would like to define a class type (type alias) for a generic class. I would like to do this so users of unit b can have access to TMyType without using unit a.
I have units like this:
unit a;
int...
Sanson asked 8/4, 2012 at 2:50
20
Solved
In JavaScript, it is possible to declare multiple variables like this:
var variable1 = "Hello, World!";
var variable2 = "Testing...";
var variable3 = 42;
...or like this:
var v...
Romine asked 29/3, 2009 at 4:37
17
Solved
Is it possible to define a global variable in a JavaScript function?
I want use the trailimage variable (declared in the makeObj function) in other functions.
<html xmlns="http://www.w3.org...
Refractometer asked 26/4, 2011 at 6:36
10
Solved
class my_class
{
...
my_class(my_class const &) = delete;
...
};
What does = delete mean in that context?
Are there any other "modifiers" (other than = 0 and = delete)?
Jobye asked 1/4, 2011 at 13:14
27
Solved
The meaning of both eludes me.
Nutty asked 11/9, 2009 at 12:27
1 Next >
© 2022 - 2024 — McMap. All rights reserved.