49,761 Topics
| |
Hello all, I need help with a scientific notation problem. I am to create a program where the user enters a 5 digit number, and it is displayed in scientific notation. This part is easy, however I am trying to take it to the next step and make it so … | |
Hello: Was trying to assign a function pointer to a struct member and am getting compile errors. The .h file I have to use has defined the struct: [code] typedef void(*callback)(bool, char*, int, unsigned long, void *); struct CallbackInfo { callback func; void* stuff; }; [/code] What I have in … | |
A C code is written: int i=-1 , j=-1 ,k=0 ,l=2 ,m; m=i++ && j++ && k++ || l++; //Line 3 printf("%d%d%d%d%d",i,j,k,l,m); O/p= 00131. I figured out that the Last variable in Line 3 is incremented only if it is preceeded by || else if preceeded by && it is … | |
hello everyone i am a student of computer app. from last 4 months i was using turbo c++. but by the advice of some people yesterday i installed codelite. i wrote a simple c++ program but i am not receiving any output i pressed ctrl+f9 as in turbo c++ but … | |
i want to write a code in C++ in which when i Press a key...it displays the letter which i have set in my code for dat key.....it means a program that changes the ascii code of a keyboard.....tell me the logic how can i do that?????? | |
I am reading the first chapter on graphics in the Stroustrup book. He explains that we students will need to download the files of a GUI toolkit in order to run programs containing graphics. He recommends the "Fast Light Tool Kit, FLTK" because the book's programs are based on that … | |
given [3][3] array it's requried to fill it's elements as following: first row will acccept only even number. second row will accept only odd number. third row will accept only prime number. | |
Hello. Apart from practice and books (like C++ coding standards by Sutter and Alexandrescu) what is the fastest and surest way to acheive coding standards in c++? Supriyo | |
Hello everyone, I have done my programm with visual studio 2010 MFC. In my programm there is 2 timers. and 4 edit controls. My problam is, i cann't change edit control value when timer is running, suppose currently edit box is empty, but i want to write some numbers, but … | |
I'm getting a segmentation fault when I try to search a linkedlist using the following description: [CODE] //! Searches for the first occurrence of value v that appears in the list //! after node n //! //! @param v The value being searched for //! @param n The node in … | |
[ATTACH=RIGHT]17350[/ATTACH]Since the release of the second edition of Parallel Studio this month, I've spent a good amount of time with it, trying out the new features. First, what's Parallel Studio? It's an add-in for Microsoft Visual Studio that gives you a large set of features for writing parallel code that … | |
What is the best way to convert a message that windows sends me to a printable ascii character? | |
Hi guys! I'm having a problem with a project in which I analize a .cpp file for certain reasons and I need to create a ifstream Class Variable but I can't! Here in the header I declare the variable, look: [CODE] #ifndef ANALIZADOR2702010 #define ANALIZADOR2702010 #include <iostream> #include <fstream> #include … | |
Hi guys. For some reason I cannot get the linked list to print. I want to copy it(which works) but I cannot get the list to print after copying it. Any suggestions? [CODE]#include <iostream> using namespace std; struct node { int info; node* next; }; int main() { node* list; … | |
hey guys, I need this Var1 = 0; Sleep(500); Var1 = 1; My problem is that the Sleep makes all my threads sleep. I want only the one thread I'm in sleep. Thanks, Jeff | |
hello it is easy program but there is a mistake in void application while printing the birthday, pt pointer gives a mistake why? [CODE]#include <cstdlib> #include <iostream> #include <conio.h> using namespace std; struct Date { int day; int month; int year; }; void printdate(Date* pt) { cout << "\nbirthday= "<<*pt->day<<"."<<*pt->month<<"."<<*pt->year; … | |
Hey everyone, So in a few of my programs, when I have the user enter input, which then gets stored in a list, there seems to be some error. I use a while loop to allow for continuous input, like [CODE] while (!cin.eof()) { cin >> value; list.insert(value); } [/CODE] … | |
Hi, I have a problem with a random number generating function. This function works great on windows XP but when I run the function in Windows VISTA and Windows 7, I receive an error message that displays: [B]"Attempted to read or write protected memory. This is often an indication that … | |
Creating a program with a circle class that has 3 private variables and 3 public functions and then have accessor & mutator functions. I know this isn't right, but I've gone through the book and my notes and I feel like I've mixed up a few ways of doing it … | |
Hi all. I recently began to give C++ a go again after failing on the first attempt. I quickly ran into the same problem that led me to C# the first time around. Strings, damn strings. I simply cannot get my head around arrays of charactors, they stress me out, … | |
Hi everyone, I was wondering if anyone could help me figure out this issue I am having with a program I have written. The problem is after you type in the number of days you want to rent the car for if it is less than 0 or greater than … | |
Hello I use 2 linked list ===> Doctor ===>student the First doctor A, has three students Student_1, Student_2 and Student_3. the second doctor B, has one students Student_4. the Third doctor C, has one students Student_5. to linked student, i using this function: [CODE] Doctor * Doct; student *st1, *st2; … | |
Stuck in this question .I cant spot where i am doing the mistake. Can somebody help me please. thanks. this is the question: ----------------------------------------------- The number of combinations (C) from M items taken N at a time is given by C= fac(M) / [fac(N) * fac (M – N)] where … | |
I am doing an exercise from Stroustrup's book. It is the drill from chapter 10 on input and output streams. The program I wrote compiles but crashes when it reaches the prompt for the output file name. My IDE (VC++ Express) simply says there is an unhandled exception yielding a … | |
Hi there; I hope I post this message in true place.My question is about modules in oop. In Code complete, author Mr Steve McConnell mentioned "module" in page 89. [QUOTE] Semantic coupling The most insidious kind of coupling occurs when one module makes use not of some syntactic element of … | |
i am required to program a remotely piloted vehicle (RPV) that will navigate a given terrain and determine the number of craters and their locations in that terrain.I have a skeleton program....need help finishing it.. [B][U]code:[/U][/B] [CODE]Position class class Position { private: int row; int column; public: Position(); void SetRow(int … | |
Can anyone explain why the last line works? It seems like it is trying to cast a CRectangle as a CTriangle (which I imagine should fail?) but it outputs "5" as the function should. [code] // virtual members #include <iostream> using namespace std; class CPolygon { protected: int width, height; … | |
Where can I find the best tutorial for teaching myself all there is to know about programming in C++? I have no money to spend on it and I am extremely new to programming (haven't written a program since BASIC, if you can count that). Any information you can provide … | |
error LNK2019: unresolved external symbol hi everybody i'm working under visualstudio2005 and i create a new namespase with some fonction ; after i have another class in a different file and when i call myfonction og my namespace i have this erreurs error LNK2019: unresolved external symbol "void __cdecl mynamespace::myfonction() … | |
[ATTACH]17390[/ATTACH] I've no idea how to solve this Q with C. help me~~ plz~~!! |
The End.