49,761 Topics

Member Avatar for
Member Avatar for Monster99d

I have Visual Studio 2012 Ultimate. I tried creating a Win32 Program and there are no debugging errors. However, when I debug it, the window I am creating should be shown on screen, but there is no window. All I see is my code. Why would this happen? #include <Windows.h> …

Member Avatar for nullptr
0
107
Member Avatar for BlinkOnly

I wrote a program to simulate a simple page flip animation in opengl and now i'm trying to replicate it with two images using texture mapping so that the second image appears on the "back" of the first image during the drag of the lower left corner of the page. …

0
159
Member Avatar for kusel1030

For a program i'm writing I need to read a .txt file into a 2-d array. The txt file contains spaces that need to also be read into the array, so I was told I need to use getline, but after searching google and this site i'm not sure exactly …

Member Avatar for omarelbeik
0
249
Member Avatar for Elixir42

Hi I am setting the sampler states initially then setting them on the fly with keypresses that I know runs but I dont see anything changing. Am I missing something. Can I just call SetSamplerState(...) anytime or do I need to call something after? static bool bToggleH = false; static …

Member Avatar for Elixir42
0
226
Member Avatar for poloblue

Good Morning, I just want to know how to implement a body initilization in a class. Below is the class information. class A { private: const int size; //a const data member char *cat; public: A(); //default constructor A(const int n); //constrcutor with parameter void print(); //print A ~A(){delete[] cat;}; …

Member Avatar for Stagnant
0
137
Member Avatar for Kamina00

Hi I was just looking up the difference between cin.get() and cin.getline(). It seems they can both function the same way except cin.get() keeps the delimiter in the buffer while cin.getline() throws it out. My question is with this code: char name[200]; char name1[200]; char name2[200]; string hi; cin >> …

Member Avatar for Kamina00
0
1K
Member Avatar for shanna62

Hi, In the program below, in the cout statement I want to understand what the code in the (ptr –arr) is doing. I understand ptr is the result of the find algorithm but I don’t know what the –arr does. If you can explain that to me I would appreciate …

Member Avatar for shanna62
0
323
Member Avatar for mike12255

I am playing around manipulating strings and currently I want to take a full name typed in by a user eg. "Mike W. Heintzman" and then take three letters input by the user, eg. M I E and then I want it to find all of those instances in the …

Member Avatar for mike12255
0
116
Member Avatar for Sasquadge

What I'm trying to so is have calc grab the add, mult, sub, div from the fraction.cpp and do that one thing I curious and can't figure out it the how to do the formula in the function and return the value to add the fractions. Can anyone give me …

Member Avatar for Despairy
0
229
Member Avatar for FreddyGIraheta

Alright you guys im new to c++ and programming and i have this homework assignment that is incomplete at the moment and i dont know where i messed up. /*Write a program to compute income tax as follows: First, display the following menu and ask the user to select his …

Member Avatar for Despairy
0
216
Member Avatar for sarafuddin

Can I get the question's solution? Define a structure called Toy with the following members: . Name of Toy . Price of Toy . Made in (the place where the toy is made) . Manufactured date (define as a structure with date, month, year) Using the structure defined above, write …

Member Avatar for Despairy
0
176
Member Avatar for daino

I'm trying to install podofo (pdf library) for use with MingW in Windows XP. It requires zlib. I'm using CMAKE to generate the makefile. For some reason, CMAKE, no matter how many times i redirect the ZLIB_LIBRARY to the zlib directory an error in CMAKE occurs telling me that it …

Member Avatar for BobS0327
0
1K
Member Avatar for kunal.madhak
Member Avatar for nyfan68

I was wondering if anyone could give me some help on this homework assignment. I have done all the tasks asks of me, but when I try to run the program to test it out, my IDE says the thread exits with a code 0 (whatever that means). I am …

Member Avatar for Ancient Dragon
0
190
Member Avatar for FreddyGIraheta

How do i input an if else statement inside an already existing if else statement?

Member Avatar for MandrewP
0
107
Member Avatar for rayden150

I am practicing my C++ programming just making an Health Care related program, I cant seem to access my data that is stored on a .txt file, All I get is that f is not declared in this scope Heres the code: [CODE] #include <iostream> #include <stdlib.h> #include "structr.h" using …

Member Avatar for anilnepal1111
0
1K
Member Avatar for amadkhalil

hye... guys i m new one in C++ and i have a matrix of size 96x48 (which is a non square matrix) i want to take inverse of this matrix .... please guide me ...thanks

Member Avatar for mike_2000_17
0
1K
Member Avatar for andigirlsc

I have am either missing a brace or have an extra brace somewhere. This code is also incomplete as I'm still working on the program. The "else" error is a squiggly red line underneath the "else" for the customer does not have a discount coupon. Thanks! #include <iostream> #include <string> …

Member Avatar for mike_2000_17
0
271
Member Avatar for kamran.j

hello everybody; i have a problem, i want to convert a string which is an Equation to double, in order to use each part which is seprate by + or - ; how can i do that? thanks a lot for your helps.

Member Avatar for kamran.j
0
219
Member Avatar for Elixir42

Hi I can't seem to adjust the D3DXFONT_DESC properties. Sometimes it breaks at getDesc(...). I want to be able to have **each text row have their own font description and be able to change it**. Why is it not working??? Maybe I setting it in the wrong place or maybe …

Member Avatar for Elixir42
0
366
Member Avatar for |\|asrin

Hi, When i run my program below, i recieve this error: ***Debug assertion failed! Expression: BLOCK_TYPE_IS_VALID(pHead->nBlockUse)*** this exception occurs when returning from fitness function. #include <map> #include <algorithm> #include <vector> #include <fstream> #include<time.h> #include <math.h> using namespace std; #define generations 10000 #define popSize 120 // population size #define makeRandNumber ((double)rand()/RAND_MAX) …

Member Avatar for |\|asrin
0
252
Member Avatar for sp42086

ATL : marshalling COleControl event source interface(MFC) to ATL client in a different process I need help on marshalling an COleControl event source interface(MFC) to ATL client in a different process. Please give me a small code example how I do implenent the needed code and where. I'm successfully able …

0
56
Member Avatar for mike12255

I am writing some code that is manipulating strings. In this program there are two functions one to get the first/last name and one to get the middle inital. the first and last name function works properly however the middle inital function is not. This function should take an inital …

Member Avatar for Ancient Dragon
0
178
Member Avatar for triumphost

I have a void pointer that I casted to a char*. I'm trying to put different data types in that char* without having to cast so much. This includes doubles, floats, int's, etc.. char* Data = static_cast<char*>(GivenPtr); switch(reinterpret_cast<int>(Data)[0]) //Or should it be reinterpret_cast<int>(Data[0]) { case OBJECT: //defined as 301; { …

Member Avatar for triumphost
0
153
Member Avatar for Carc369

Basically my assignment is create the best Boggle board. Basically so far I've successfully created a randomly generated board, read in the dictionary, allocated dynamic memory for the dictionary, counted the frequency of each letter (for example 'a' has x amount of characters in the dictionary), and found the percentage …

0
153
Member Avatar for shanna62

Hi, I'm new to the C++ programming world and am having a bit of difficulty understanding the difference between a container and container adapter. I thought a container such as a vector, deque and list that hold objects. And an adapter is defined as something that converts something else such …

Member Avatar for shanna62
0
130
Member Avatar for shawn.widjaja

good afternoon gents, first semester cs student here. i'm having a world of confusion to create an X having the left formed with "+", the right side formed with "X" and the center with an "*". with an integer of 7, the output should look like: +-----X -+---X- --+-X-- ---^--- …

Member Avatar for deceptikon
0
153
Member Avatar for Elixir42

Hi I dont understand why this int keeps corrupting ::Draw works fine but the variable m_EndRow ends up as a funny number. The class is supposed to print debug info to my screen. ::AddText adds a row of text which is then printed in DrawTable. Simple problem if you already …

Member Avatar for Elixir42
0
164
Member Avatar for triumphost

Does anyone have a tutorial for writing Custom Allocators and Memory Pools for std::vectors and Objects? Basically I've looked at placement new and I want to know how I can force vectors to use this with my shared memory pointers. I'm thinking writing a class for it might be much …

Member Avatar for mike_2000_17
0
747
Member Avatar for vedel.bajic

Basicly I try to send values to a PHP Server and read out returned information I get from the Server. The PHP code is not the problem. My Problem is I don't know how I can send values with C++. I don't have any code yet because I don't know …

Member Avatar for Gonbe
0
220

The End.