C++ :: Error While Making DLL

Dec 17, 2013

So I tried to find some youtube videos on how to make a DLL, I found one, I also found several topics (like on msdn and stuff), but I have this code

header

#include <WinSock2.h>
#include <WS2tcpip.h>
#include <Windows.h>
#include <string>
using namespace std;

#pragma comment(lib, "ws2_32.lib")

[Code] ....

And I'm getting these errors:

1>error LNK2001: unresolved external symbol "private: static char * PathSocket::cBuffer" (?cBuffer@PathSocket@@0PADA)
error LNK2001: unresolved external symbol "private: static unsigned int * PathSocket::socket" (?socket@PathSocket@@0PAIA)
error LNK2001: unresolved external symbol "private: static void * PathSocket::hIDTask" (?hIDTask@PathSocket@@0PAXA)

WHY is there static, and what does dllimport/dllexport does? also there are NO tutorials with variables inside dll >.<

I've been following this [URL] ..... and the video I already lost, however there's no

#ifdef MATHFUNCSDLL_EXPORTS
#define MATHFUNCSDLL_API __declspec(dllexport)
#else
#define MATHFUNCSDLL_API __declspec(dllimport)
#endif

in the video, why do we have to use that? [URL] .....

View 19 Replies


ADVERTISEMENT

C++ :: Making A Game With GUI

Feb 27, 2015

Here's my game, what do I need to learn to make a basic GUI? (Easiest way possible for now).

--NOTE, the code was a bit too long for me to post. I can add it if it is necessary. Basically all I want are 4 buttons on the main screen, one that says "Arena," "Store," "Stats," and "Exit."

There will of course be sub menus to each option, but we will get to that later.

View 1 Replies View Related

C++ :: Making DLL Of EXE Project

May 28, 2013

I have project that is on c++. it runs fine. i want to use it in my C# application as a dll. i have created its dll and but firing exception of "interprocess communication".

Is this a doable task that creating dll of an exe project and using it in C# application?

View 1 Replies View Related

C/C++ :: Making Tic Tac Toe Without Arrays?

Nov 13, 2014

I am trying to get this to work without arrays. At the moment all I am trying to do is allow it so that when the user presses 1 the board prints with 1 replaced by X, tell me where am i going wrong. I know its not finished.

#include <stdio.h>
#include <stdbool.h>
char a = '1';
char b = '2';
char c = '3';

[code]....

View 3 Replies View Related

C :: Making HTML Shapes

Oct 13, 2014

So basically I have to write a C program that, when opening the html file in a browser, looks essentially like this: (Size, position, color of the shapes doesn't matter so long as I have one of each shape and the box surrounding them. Words up top dont matter either.)

This is what I have so far:
Code:
#include <stdio.h>
#include <stdlib.h>
#define FILENAME ("A4P1.html")
[code]....

Anyways i can get the individual shapes, but I don't know how to get all the shapes to appear at once..

View 6 Replies View Related

C :: Making A Teapot With Triangles

Oct 15, 2013

i have an assignment where i have to draw a teapot using triangles, and are struggling with the part where i have to color it. Here is an link to the assignment URl....

I have managed to draw the teapot and translated it onto the screen. the part i need support with is making a bounding box for the triangle and coloring it.

View 5 Replies View Related

C++ :: Making A Table For 10 Employees

Apr 22, 2014

I have to make a table for 10 Employees to look like this:

Employee ID Gross Pay Net Pay
101 540.58 480.80
158 796.32 630.20

How can I do this? This is my code so far.

#include <iostream>
#include <iomanip>
#include <string>
using namespace std;
void get_emp_rec(int &id, double &prate, double &hours) {

[Code] ....

View 2 Replies View Related

C++ :: Making A Countdown Timer?

May 17, 2013

I'm creating a game in which i.need player to.answer.my question within 10 seconds...

So I need a code for this timer... I don't want code to be paused by sleep or delay functions.. But I need that it waits.for 10 seconds.. and if user types answer in between.. it.reads it

And if player.doesn't answers it within 10 sec.. it displays a message

View 2 Replies View Related

C++ :: Making Octagon Out Of Right Triangles

Jun 28, 2014

One exercise says that, "Define a right triangle class. Make an octagonal shape out of eight right triangles of different colors."

Making such a class isn't difficult. I wrote it as follows:

#include "Simple_window.h"
class right_triangle : public Shape {
public:
right_triangle(Point p, int l, int sh): c(p), _long(l), _short(sh)

[Code] ....
But it sounds that making an octagon using eight right triangles isn't possible!

View 2 Replies View Related

C++ :: Making A Sorting Function?

Nov 23, 2013

#include<iostream>
#include<fstream>
#include<iomanip>

[Code].....

make it sort ascening wise for salaries and have the occupation sort with it.

View 6 Replies View Related

C/C++ :: Making A Simple Animation

Sep 20, 2014

I wish to create a simple animation, similar to the pong game but completely automatic (i.e. both sides play against eachother sort of like in a screensaver of sorts).

I am clueless on to even start tackling this, what tools to use and how to use them, to make them do what I want. I have had some experience with C++ scripting while modding Fallout 3, but I'm not sure how similar the scripting system available in the SDK for that game, is to the real thing.

Like I was saying I want to create a simple animation where two AI blocks try to prevent a ball from reaching the wall behind them.

View 3 Replies View Related

C/C++ :: Making Octagon Out Of Right Triangles?

Jun 28, 2014

One exercise says that, "Define a right triangle class. Make an octagonal shape out of eight right triangles of different colors."

Making such a class isn't difficult. I wrote it as follows:

#include "Simple_window.h"
class right_triangle : public Shape {
public:
right_triangle(Point p, int l, int sh): c(p), _long(l), _short(sh) {
add(Point (p));}
void draw_lines () const

[code]...

But it sounds that making an octagon using eight right triangles isn't possible!

View 4 Replies View Related

C/C++ :: Making Addition Loop?

Nov 19, 2014

What my ultimate goal here is to make a program that asks the user how many numbers they would like to add followed by asking the user what numbers they want to add. I want the amount of numbers they can add to be infinite and have the loop continue adding the numbers until it reaches the final number. I just need to know how to do this.

Here's my code:

#include <iostream>
#include <string>
using namespace std;
int main() {
//variables
int amount;
float num;
float sum;

[code]....

View 3 Replies View Related

C/C++ :: Queue Making Using Arrays

Nov 11, 2014

I'm trying to write a code that proves a queue like fifo (first in first out). I have four characters :

p(rint),e(nqueue),d(equeue) and q(uit).

The problem is when I press d a first character must get rid of, but not. When I press d the numbers get double.

Example input:
e 2 3 9 8 7
p
2 3 9 8 7
d
p
3 9 8 7
d
p
9 8 7

#include <stdio.h>
void enqueue(int queue[], int newnum, int *tail_p, int maxsize);
void deque(int queue[], int *tail_p, int *elem);
void printqueue(int queue[],int count);

[Code] ....

View 1 Replies View Related

C++ :: Making Constructor For Array Of Character

Jan 16, 2015

Code:
class Robot{
char name[15]; //assign to char n
int x, y , direction;
void ToString(int d);

[Code]......

how do i assign char name[] in the class to char n in the constructor?

View 3 Replies View Related

C :: Making Integer From Pointer Without A Cast

Dec 15, 2013

Code:
#include <stdio.h>
#include <stdlib.h>
#define CLASS 4
#define STUDENT 11
#define GRADE 5

[Code] ....

Giving me that error on 75:10
avesub+=grade[k];
and 90:17
donkeypunch+=grade[j][k];

not sure exactly why

View 8 Replies View Related

C :: Making Header Files With Extension?

Mar 6, 2015

I have a problem with making header files in c, i get the code written only in main.c and then i have to create a files with extension .h and extension .c but how to do it.

View 4 Replies View Related

C :: Making Linked List From 2D Array

Nov 24, 2014

I have a 2D array, array[20][3]. Each row represents a storm and each column represents month #, wind speed, and pressure in that order. This data is read from a file and auto-fills the array. I need to be able to give users the ability to add an additional storm or delete a storm. I know that a linked list would be the best approach but I'm not very familiar with linked lists.

View 1 Replies View Related

C :: Making Self Balancing Robot - Using PID Loops

Oct 20, 2013

As the title says im trying to make a self balancing robot.

I am using an accelerometer and a gyro as sensors.

I am just really confused when it comes to programming in a PID loop to actually use feedback from the sensors to control the motors.

I sort of understand what needs to be done concering PID loops, just i dont know how to do it.

View 9 Replies View Related

C :: Making A String Print In Reverse

Oct 15, 2013

Here's what I have to do: Using strcpy() pass it two strings of characters (such as a name like John Johnson) and copy the second string into the first, in reverse order, and print both. Write a main to exercise your function and to illustrate that the function is working properly.

View 4 Replies View Related

C :: Making Program For Comparing Strings

Oct 16, 2013

I know there is a function for comparing string but i am making it to just improve my concepts.error : 2 is coming as answer when i put same sting in both place.

Code:

#include<stdio.h>
main()
{
char str1[] = "hello" ;
char str2[]= "hello" ;
int q;
q = xstrcmp(str1,str2);
printf("%d",q);
}

[code]....

View 5 Replies View Related

C++ :: Making Array Bigger - Resizing?

Feb 20, 2013

As part of class project I'm working with the following code...

Item.h

#ifndef ITEMH
#define ITEMH

#include <iostream>
#include <sstream>
#include <string>
#include <iomanip>

[Code] ...

The plan is to add a new method 'resize' where a new array will copy the contents of the first original array and modify the already existing 'add' method to call 'resize' when necessary.

Up till now, in the constructor I created the new array, should I give the array a default value?

View 5 Replies View Related

C++ :: Making Program Involving Pointers

Dec 9, 2014

Write following functions

makingArray: this function will return a double pointer which points to a double array and take one parameter- an integer variable which has a default argument of 5. The argument is the size of the integer array. when the function is called, the users input or default argument will be used for the size of the array. The function will initialize all elements of the array with the 'cin' object.

getTotal: this function will return a double and take two parameters- a double array, which can NOT be modified by this function, and an integer variable for a size of the array. This function will calculate the total of all elements then return a double number which is the total.

main: demonstrate functions( makingArray and getTotal) by calling them in a program

View 1 Replies View Related

C++ :: Making Bar Graph By Comparing Two Vectors

Jan 5, 2014

I am trying to compare two vectors and make a bar graph. I have tried sorting it and pushing it into another vector but this issue is when I go to output it. My logic is wrong.

#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <iomanip>

int main(int argc, const char * argv[]) {

[Code] ....

Output

22 *
44 *
22 *
45 *
33 *
44 *
18 *
34 *
33 *
12 *
3 *
5 *
34 *
33 *
5 *
7 *
22 *
44 *
49 *
9 *
18 *

View 3 Replies View Related

C++ :: Making A Money Bag - Class Inheritance

Feb 18, 2015

I am having some serious issues with class inheritance. I am trying to make a MoneyBag class inherit from a class called bag. This will not work. I get an error complaining: error: expected class-name before '{' token. And yes I have googleing it and tried several of the various solutions offered with no avail.

The MoneyBag is pretty simple right now as I wanted to get it connected to bag before I tried to do anything with it.

//MoneyBag.h//

#ifndef MONEYBAG_H
#define MONEYBAG_H
#include <bag.h>
class MoneyBag : public bag{ ////<<------ Error appears on this line.

[Code] ....

So based on everything I have seen on line the statement:
class MoneyBag : public bag{ is legal.
As it is done this way on this very site's tutorial:
class Rectangle: public Shape, public PaintCost{

View 2 Replies View Related

C++ :: Making A Finite State Machine For Lab?

Apr 20, 2013

I am making a finite state machine for a lab. I have here a 2 files with the code for the FSM. I know it isn't finished yet, I know what needs to be put in. The only things I would need help on are the errors that I get.

Warrior.h
#ifndef _WARRIOR_
#define _WARRIOR_
#include "State.h"

[Code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved