最近遇到了个挺有意思的问题,但是感觉细节方面还是不太懂,希望能够从程序生成的预编译阶段解释下原因
#define test 1
#define k(s) #s
string t = k(test)
这个t不是本人想象中的“1”,而是“test”
解决方案
20
在展开当前宏函数时,假如形参有#(字符串化操作)或##(记号连接操作)则不进行宏参数的展开,否……继续阅读 »
9年前 (2016-04-15) 1526浏览
0个赞
本人想将一个函数作为另一个的函数的参数,定义如下:
int lmdif_( int (*fcn)(int*,int*,double*,double*,int*),
int* m,
int* n,
double* x,
double* fvec,
double* ftol,
double* xtol,
double* gtol……继续阅读 »
9年前 (2016-04-15) 1538浏览
0个赞
VC写的网络调试助手源码,哪位有的发一份给本人好吗?包含TCP的客户端和服务器 275717218@qq.com
解决方案
……继续阅读 »
9年前 (2016-04-15) 1841浏览
0个赞
#include <Cocoa/Cocoa.h>
#include <cstdio>
#include <string>
#include <list>
static bool select_folder(std::string & foldername)
{
foldername.clear……继续阅读 »
9年前 (2016-04-15) 1399浏览
0个赞
微信中做活动的页面怎么调用手机震动+声音的啊?
解决方案
40
引用:
是qq浏览器的网页, 和微信的内置浏览器也差不多,所以用qq浏览器测试了下。
补充一下 本人刚刚试了一下 微信上好像是支持震动的
if (navigator.vibrate) {
navigator.vibrate(2000);
} else if (navigator……继续阅读 »
9年前 (2016-04-14) 1370浏览
0个赞
通过http GET方式请求获得jsapi_ticket,能成功获取到ticket,
根据算法也能成功生成签名,但是当操作进入需要分享的页面时,初始化页面用JS写下面的配置信息
wx.config({
debug: true, // 开启调试模式,调用的全部api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出……继续阅读 »
9年前 (2016-04-14) 2277浏览
0个赞
function chooseImg_Opinion() {
wx.chooseImage({
success: function (res) {
showImgs_Opinion(res.localIds);
……继续阅读 »
9年前 (2016-04-14) 1814浏览
0个赞
#include<iostream>
using namespace std;
class complex{
public:
complex(const complex &a); //拷贝构造函数
void set(int,int);
void print();
complex operator+ (com……继续阅读 »
9年前 (2016-04-14) 1180浏览
0个赞
#include<iostream>
#include<string>
#include<vector>
#include<iterator>
#include<algorithm>
using namespace std;
struct Pizz
{
string name;
double zhi……继续阅读 »
9年前 (2016-04-14) 1171浏览
0个赞