49,757 Topics
| |
Hi I am a beginner in C++ programming. I am required to use the power function for one of my programs and keep getting the error message. Below is my program [CODE] 1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 5 int main(){ 6 7 //Declare and … | |
Hi... getdelim function is posing an "undeclared identifier" problem during execution .so i included #define _GNU_SOURCE even though it is posing the same problem . i am executing the c++ program in visual studio in windows platform . how to add GNU extensions in Visual studio ? | |
We have a programming project due in which we are supposed to create a boggle board. We are supposed to read in a file with the boggle dice (basically just sixteen lines of six random letters), then ask the user if they want to shake the board. If they say … | |
Does Anyone know how i can convert this 1D array (findArray) that checks for an element Into a function called 2Dfind that searches a 2D and pass each array to arrayfind(), to do the searching [CODE] int findArray(int A[], int n, int x) { for(int i = 0; i < … | |
I am using a backgroundworker that are doing Very much work. I have about 300 pages of code inside this worker, where it is happening a lot of different things. Everything happens inside a for loop like my code here. The problem is this that if I just as much … | |
I read this code section from a tutorial, but I cannot understand it thoroughly. It is about Pointer & Class Pointer & Array Pointer. This is it: [code] // pointer to classes example #include <iostream> using namespace std; class CRectangle { private: int width, height; public: // prototype void set_values … | |
[code] #include<stdio.h> #include<conio.h> #include<string> #include <iostream> #include<stdlib.h> #include "convert.h" using namespace std; int check(string); string send(string); string hr_str; int main() { int result=2,n; char tt[7]; char h[2],m[2],s[2]; cout<<"\nEnter the Time "; string colon=":"; while(result !=1) { printf("\nHR -> "); scanf("%s",h); result= check(h); } cout<<"\nMain Fun"<<hr_str; string t_time; strcpy (t_time,hr_str);//-----problem is … | |
I got this silly problem and honestly dunno why it isnt working . The scenario is i got a text file with information and i got to print the ASCII equivalent of the text into the screen . While attempting to do so , i am getting the binary equivalent … | |
Hello, I've had some problems converting a string into a char. I've tried many, many things, but it didn't seem to work. I'll post the code below: [code] char filename[1024]; char* url; string sUrl; HINTERNET hINet, hFile; hINet = InternetOpen("InetURL/1.0", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); if ( !hINet ) { … | |
I'm working on this program. There are 3 classes. These two classes [COLOR="Red"]PassengerMenu and SecurityMenu[/COLOR] are inherited from the class [COLOR="Green"]MainMenu[/COLOR] So the main menu would provide the logo and a description (normal cout). Also an access to either the passnger menu or the security menu. according to your choice. … | |
Ok so I posted this before but didn't get a response... Our prof gave us this problem: "Write a program that will get, from the user, a string of characters such as a sentence, and place this into a declared char array. Ask the user which letter they would like … | |
Hello, i want to make a multiline listbox, that would look like [URL="http://www.daniweb.com/forums/attachment.php?attachmentid=13350&stc=1&d=1264164137"]this[/URL]. I was searching for solution for a week so i think now is the time to ask for help :( As you see this listbox is so special, because it has two lines per row and those … | |
Hey guys, I'm working on converting some existing Java Code over to C++, trying to use only built in standard libraries because the platform we are building on we won't be able to have any outside libraries, and it's been a while since I had to write "fancy" c++ code … | |
Hi, i was wondering if someone could show me how to log into a website using c++ .net? I want to login to say megaupload.com for example, now i have to code in c++ but how could i do it in managed c++? A link or something would be great, … | |
I'm a java developer. Recently, at university, I have been assigned a task about network programming with C++. The specification is about create a distributed application (with a server and many clients). If they allow to use RMI in Java or .NET Remoting with C#, it's easy for me, because … | |
when i comple this code it says, wander.cc:28: error: 'Wander' was not declared in this scope I got this code from Jenny Owen's tuorial on Player/Stage. In that one th Wander function is not decalred. Could you please tell me why I am getting this error and how to declare … | |
Hello I'm trying to use taglib in my Qt-program but it won't work. With this code, it doesn't compile although it should because I just changed the parameter [I]a[/I] from the example included with the source. [CODE]void Test(){ const char* a = std::string("song.mp3").c_str(); TagLib::FileRef f(a); }[/CODE] When I drop the … | |
I have created a completely new new Windows Form application and are trying to add this namespace: [code] #include "stdafx.h" #include <ctime> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <limits> #include <ios> #include <cstdio> #include <numeric> #include <cstdlib> #include <ctype.h> … | |
please i want the code of directed graph fast path and how i can creat graph to linked list | |
Hello, l sor of scribbled this code up from a few tutorial l have looked over, combining tutorials never works for a newbie to C++ :( now this is what l have written:: [CODE]// InfoMenu.cpp : main project file. #include <stdafx.h> #include <iostream> #include <string> using namespace std; int main() … | |
Hi I'm new to computer programming. 'Im just needing to learn some basic c++ for a larger project. So if someone wouldn't mind guiding me through some basics on i/o streams. I need to able to open a .txt file saved on my c drive and be able to count … | |
i am going to make the Database (i.e enter name, phone # etc) but how i will make it permanent (i.e to save it permanent). When i close the program and reopen, my previous Data that i had enter should Present??? How i will make it??? | |
Hi all, I have two problems, the first being the most important: 1. I have a Win32 (Non-MFC) app with a window and a win32 menu on it (HMENU), and I've been searching all day for a way to display shortcuts (like "Ctrl+C") on the menu items. I know there's … | |
I am attempting to write my first c++ program. It is a bot that will me used to connect to a Multi User Dungeon. The premis is this The application will open a server on a specified port on the local machine, and also connect to the MUD server. The … | |
Ok its been awhile since I've taken a CS class and I am still a bit rusty. It seems like a simple problem but I just cant get my brain around it. The program needs to shake a boggle board. For those of you who have never played this game, … | |
Hi! i m doing a project for my MSc academic year i need an implementation code for single perceptron network, which will have six inputs and a single output which will give me acurate result. | |
a C++ newbie here.. I am doing the question at the end of Ch3 which is about classes, objects, and constructors. I'm stuck on a few that asks you to write a C++ statement for each: (On 5, I wasn't sure how to give a value in the same statement.. … | |
does anyone know how to make an array search for how many words are in it? | |
Hi everyone...I am building a program to input students names(first and last) and also GPA. I have everything working but the sort by last name. Everything works fine, even the GPA sort but the last name sort will not. Please help. Below is the function in my program i am … | |
Hi guys, can you please describe the knapsack algorithm in English. I googled this, the first page was wikipedia. The algorithm there is too mathematical which doesn't help me to understand the solution. Can you please describe its algorithm? |
The End.