I want to make a program in C++ that reads a file where each field will have a number before it that indicates how long it is.
The problem is I read every record in object of a class; how do I make the attributes of the class dynamic?
For example if the field is "john" it will read it in a 4 char array.
I don't want to make an array o...
having trouble getting my directx going I get the following error
1>Linking...
1>main.obj : error LNK2001: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32
1>C:\Users\numerical25\Desktop\Intro ToDirectX\msdnTutorials\tutorial0\tutorial\Debug\tutorial.exe : fatal error LNK1120: 1 unresolved externals
below is my code
// ...
I am doing some web data classification task and was thinking if I could get the co-ordinates of html elements as they would appear on a web-browser without taking into consideration any css or javascript being referred in the web page.
My language of programming is c++ and the need results for a couple million of pages, so it has ...
Hi,
I have a pointer (void *) to a function and I want to know which process this function belongs to. I have no idea which way to go about it, but I think it's possible by using some form of VirtualQuery trickery. Any help would be appreciated.
Thanks in advance,
CLARIFICATION: By "belong to process" I mean what process the function ...
Hi,
I stumbled upon a rather exotic c++ namespace problem:
condensed example:
extern "C" {
void solve(lprec * lp);
}
class A {
public:
lprec * lp;
void solve(int foo);
}
void A::solve(int foo)
{
solve(lp);
}
I want to call the c function solve in my C++ member function A::solve. The compiler is not happy wit...
I want a mysql connection with C++ to my database. I downloaded the files from http://tangentsoft.net/mysql++/
I wasn't able to successfully install it and get the libraries in the c:/mysql++ folder.
Can somebody help / do it for me and upload it :).
...
Hi. I'm trying to compile code in g++ and I get the following errors:
In file included from scanner.hpp:8,
from scanner.cpp:5:
parser.hpp:14: error: ‘Scanner’ does not name a type
parser.hpp:15: error: ‘Token’ does not name a type
Here's my g++ command:
g++ parser.cpp scanner.cpp -Wall
Here's parser.hpp:
#ifndef PA...
int exam1[100];// array that can hold 100 numbers for 1st column
int exam2[100];// array that can hold 100 numbers for 2nd column
int exam3[100];// array that can hold 100 numbers for 3rd column
int main()
{
ifstream infile;
int num;
infile.open("example.txt");// file containing numbers in 3 columns
if(infile.fail...
What is the exact difference between having myMethod(Thing& a) or myMethod(Thing a)? Because later you still ned to use &a if you want the address of the object.. I'm not sure when to use what..
...
I'm trying to speed up a python routine by writing it in C++. then to use it using ctypes
or cython.
I'm brand new to c++. I'm using microsoft express c++ as it's free.
I plan to implement an expression tree, and a method to evaluate it in postfix order.
The problem I run into right away is:
class Node {
char *cargo;
Node left;
...
I would like to have the ability to process Win32 messages in a console app and/or inside a standalone DLL.
I have been able to do it in .NET with the following article and it works great in C# inside a console app and standalone DLL
http://msdn.microsoft.com/en-us/magazine/cc163417.aspx
Is there a way to do the equivalent with C/C++ W...
Im using libmysql for mysql in c++ and now i got a column, type= text, and i want the word(s) inside it. how to do this?
when i use Blob (dont know what it is) it gives me e44158.
can somebody help me please?
...
#include <iostream>
#include <fstream>
using namespace std;
int calculate_total(int exam1[], int exam2[], int exam3[]); // function that calcualates grades to see how many 90,80,70,60
int exam1[100];// array that can hold 100 numbers for 1st column
int exam2[100];// array that can hold 100 numbers for 2nd column
...
Friends,
I want to read a pair of characters separated by \t. I want to continue reading the input until user enters z for any of the characters.
Here are the options I thought:
while (cin>>ch1>>ch2)
{
// process ch1 & ch2
}
std::string str;
while (getline(cin, str) ){
//split string
}
Also, I want to validate the input to make...
I would usually search for this error. But in VS C++ Express, this error comes up for just about every mistake you do. Any how I recieve this error below
error C2146: syntax error : missing ';' before identifier 'vertices'
everytime I add the following code at the top of my document
// Create vertex buffer
SimpleVertex vertices[] =
...
It is theoretically possible to use a boost library (e.g. boost threads) inside a cocoa project?
...
hi everyone,
i'm making a client for pop3 and somehow i can't figure out how to handle multiline responses. There is no difference in the response from server whether it is single or multiline, it always ends with CRLF (considering the usual case) so how do I know if I should call recv() once more?
...
When I add the following to my code.
// Define the input layout
D3D10_INPUT_ELEMENT_DESC layout[] =
{
{ L"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },
};
UINT numElements = sizeof(layout)/sizeof(layout[0]);
I get the following error
1>c:\users\numerical25\desktop\intro todirectx\msdntutor...
I don't know the cause of these errors I am receiving from Visual Studio 2010.
This is the code from my program from line 343 to line 408:
int create_den_from_img(char *img_file_name_part, int xlen, int ylen, int zlen )
{
IplImage* imgs = 0;
char str[80];
unsigned char *data,*imgdata;
/* allocating memory */
data = (unsigned...
I have VS 2008 and I want my application to work with Windows 98 without needing to include MSVCR90.dll .. Win98 comes with MSVCR60 so how could I tell MSVC to do this? Is my only option to hunt down Visual studio 6?
Thanks
*also I want to avoid static linking msvcr
...