49,756 Topics
![]() | |
Hi I am looking for the code Snipet which can validate the IPv6 address which is given as string format. IPv6 Address string validation, If any one tried code can you share? Mean while i also started writing code if i completed that i will share the same. Thanks a … | |
int i=0; A1: cout << “I is “ << i << endl; i = i + 1; if ( i <= 10) goto A1; cout << “the loop is completed\n”; It is poorly written using goto statements; your job is to convert it into a. while-loop, b. do-while loop, c. … | |
In reference to the code below: why does in one case we get the full string and in the other the address? Can someone please explain this? [CODE] char mary[] = "Mary"; char* aPtr = &mary[0]; int b = 5; int* bPtr = &b; cout << "aPtr value is " … | |
Assignment: 2. Write a menu driven program to execute the given class. A. To search for student by name. If the student does not exist, appropriate message should be given. B. To display the details of the student having greatest average. C. To display the details of all the students. … | |
I have been programming in C++ for a while now, though I have always only written programs with simple command-line interfaces, never a GUI. I have one such program right now which I would like to convert into a Windows application with a full-fledged GUI with customized graphics (for buttons, … | |
How difficult would it be to have a web browser inside a window's application? And what kind of API is available, or is it possible using provided headers with VS. Thanks | |
Hi, i have the following defined on top of the program in C #define Mess1 "\n\rWaterflow Sensor"; in my main i have the following written:- AsUSARTsendBytes(Mess1); The function being called is like that void AsUSARTsendBytes( char *bytes ) Something however is going wrong the compiler is giving the following message:- … | |
After I performed some operations on the vector of structs, I need to free the memory. I suppose clear() will not be sufficient, but I'm not sure how to perform individual delete. [code] typedef std::vector<VertexRAM> VecVertexRAM; // definition of a vector of structs template <typename type> void freeFromMemory(std::vector<type>& myVec) { … | |
1. What numbers will be displayed when code corresponding to the following pseudocode is run? Set N = 3 For (K=N; K <= 5; K++) Write N, “ “, K End For 2. Rewrite the following pseudocode using a For loop instead of the While loop shown as follows: Set … | |
if i want to dereference an object(using delete operator) of DERIVED class which is being referenced using a BASE class reference, which destructor would b called automatically?? BASE class destructor or DERIVED class destructor?? | |
Hi I have a fundamental question, about new projects using wizard • For File/New wizard Win32 projects the applications include the message queue and message loop. • For File/New wizard MFC Application Dialog Based there is no message loop and message Queue How can I add message loop and message … | |
Hi, I have a problem with a Flashcontrol(AxShockwaveFlashObjects). The Flashmovie that I get plays well, this is not the problem. I have to show a HTML code to explain the problem I have. I have received a link that is: [B]"http://online.casinotropez.com/promoLoadDisplay?key=em9uZUlkPTM4MzA3MDk2OCZsYW5kaW5nUGFnZUlkPTEzNTEwMTUzJnByb2ZpbGVJZD01MjY5NTE%3D&clickTAG=http://online.casinotropez.com/promoRedirect?key=em9uZUlkPTM4MzA3MDk2OCZsYW5kaW5nUGFnZUlkPTEzNTEwMTUzJnByb2ZpbGVJZD01MjY5NTE%3D "[/B] This link in this HTML here will play … | |
I'll start by saying that I've solved the problem I had, I'm just trying to gain an understanding of exactly what caused it in the first place. Please note I'm cutting out as much middle-man code as I possibly can for understanding purposes. My program is currently setup so that … | |
Hello, I have recently been able to delete files using this code(With the aid of others from the forum) And I was wondering how you can change this, to suit deleting a folder [code=cpp]#include <iostream> #include <windows.h> int main(int argc, const char * argv[]) { // Get a pointer to … | |
[B]Al salamo Aleekom And Hi..... <= Thank you for reading my topic. ---------------------------------- I read this statements from C++ book but i can't understand it....!! Can anyone help me to understand it In short....[/B] [INDENT][INDENT]The Stack and the Free Store (Heap): .................................... In the section “How Functions Work—A Peek Under … | |
how can i read character by character from a text file using isrteam. i use : istream s; char *next; next=new char; s.open("example.txt"); s.read(next,1); but this gives me each character with some dummy symbol. | |
Hi all, I wish to construct an text editor with linear link list. Now I am writing a function to add a sentence into it and display all. My problem is I can only input a string as it will not take whitespace as input. And I don't understand what … | |
[CODE] #include<iostream> #include<conio.h> #include<string.h> using namespace std; int main() { char ch; do { char str[80]; cout<<"\nEnter The String\n"; gets(str); int len=strlen(str); for(int i=0;i<len;i++) cout<<str[i]; cout<<"\nContinue?\n"; cin>>ch; } while(ch=='y' || ch=='Y'); getch(); return 0; }[/CODE] On executing the above program, the loop asks "Continue?" only once and after that it … | |
I'll admit, I feel like an idiot. It's 3 in the morning and I refuse to go to bed until this is solved. So here's the dealio: [code=c] void doThisIGuess() { int numb = getch(); char numa = char(numb); int num = atoi(&numa); if (num != 0) { cout << … | |
Hello everyone; I'm trying to do something which I'm not sure if it is available in c++. Actually, I'm developing a game with functions.And to reset the game when the user presses a button or a certain event occurs, the program must start running from all over, say from the … | |
Hello everyone, I don't know if I'm confused with itoa,excuse me for this if so, but what I'm trying to do is: I have an array of characters, say [CODE]char example[7][/CODE] I assigned the first 4 characters by [CODE]strcpy(example,"Fill");[/CODE] Then I'm trying to fill the next char with an integer … | |
Hi, does anyone know of a good library for C++ that enables MIDI use? I know there are posts here about some of them, but they are either obsolete or they have virtually no support. If besides the library you guys could point me in the direction of some tutorials … | |
i have a text file on my desktop saved as a .cpp file and has code in it. how do i compile and run it in in terminal using the given g++???? | |
Hi, I am working on my next year's school project for my A levels, and I need a bit of help in deciding how to continue my program's design. Basically the project involves writing a stock managment software, for a fictional company. Now at the core of this programm lies … | |
Hello, first off, I'm new to the forum and, more importantly, writing C++ and working with the iPhone SDK. I was wondering if anybody could help me - I'm really eager to keep learning, and everything has been okay until now. I'm getting an error that I can't resolve, no … | |
Hello, I have a 2D array of 10x10 and I want to search the surrounding cells of only a 3x3 portion of it at a time. How can I go about totaling up the values of the following nested loop? There should be a 1 or a 0 and if … | |
I have read all the MSDN docs on this subject that seemed relevant, but I am still confused about a few things. I am trying to achieve functionality like WSAAsyncSelect(), but use a separate thread instead of the main window. Can I use the regular WSAEventSelect() for this? and if … | |
Hey there, I've been attempting some Win32 programming for a while now, but I just can't seem to find a function where I can get the HWND by the resource ID. Just an example: [CODE] CreateWindowEx(NULL, L"BUTTON", text, WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, x, y, width, height, parent, (HMENU)IDC_BUTTON_OK, GetModuleHandle(NULL), NULL); HWND btn = … | |
Well, I have a test program, in which I wanted to test if it was possible to open a textfile(text.txt) for input, display it via cout, then passing the object via reference to another function, in it and display the file again(which should already be open,which is the whole point). … | |
I want easy algorithm with minimum order to get the sub-rectangle with the largest sum in an array for example array as a input 0 -2 -7 0 9 2 -6 2 -4 1 -4 1 -1 8 0 -2 sub-rectangle 9 2 -4 1 -1 8 maximum sum of … |
The End.