49,761 Topics
| |
Hi All, A newbie question and a really stupid one indeed:$ I want to store some incoming data into an array and then compare it with an array that I have defined. I am posting the program here but it is Arduino based and uses the Wire library. But I … | |
My program generates a list of random or pseudo random numbers between a certain range specified by the user through the console. My problem is when the user, or in this case myself, tries to generate a random number list specified by entering true(1) in the console the output is … | |
I have made a following program that will convert lower case letters in to upper case and upper case letters will remain same and that will be done Realtime (as character is typed). [CODE]#include<stdio.h> #include<conio.h> void main(void) { char ch; printf("Type a sentence: "); while (ch!='\r') { ch=getch(); if (ch … | |
Hi! I'm a newbie in this forum. I'm a novice C++ programmer and we are tasked to create a program with the following requirements: [QUOTE]Given the sequence of numbers [I][B]n a1 a2 a3 . . . an[/B][/I] a simple histogram should be printed to the computer screen. The number [B][I]n[/I][/B] … | |
hello, I have been working for the past few monthes on a c++ code generator and im finally at an alpha stage. The product generates code from a UML layout, however i have spent a fair amount of time searching for a compiler that will allow me to easily embed … | |
Hi, I have a problem with a webrequest with the below code. If I try to request "http://www.google.com", it works fine. But when I try to reach this long URL below with this code, I receive an error: I wonder what this depends on and what could be done? [B]The … | |
Hi, I am doing a program using Doubly-Linked List. I am just studying C++, and still new in this field. My question are: - How can I make a method which[B] inserts a new node before the currently selected node, then makes the new node the current node[/B]? - How … | |
I need a way to concurrently create variables with a loop. Like... Instead of int my_var_1 = 1; int my_var_2 = 1; int my_var_3 = 1; Because the user may need thousands of variables, and I don't want there to be a limit. So I was wondering if there was … | |
Hi, I am looking for some advice here.I have basic knowledge of C++ and regularly write programs in it.I haven't tried anything related to networking in it.I want to start now and I'm clueless about the possibilities.I am novice in knowledge of networks and people have recommended many books but … | |
Hi All, I am trying to create a image text detection program. The program is up and running, and I can distinguish between text and non-text using laplacian based method with an acceptable accuracy. However, the problem is that I need the program run with the speed > 100 (images/s), … | |
hey guys! ive spent another 3 hours trying to find out what is wrong with my code! i tried many ideas that came into my head but they didnt work :( here is my code.. ive narrowed my problem and shown where it could possibly be by enlarging and making … | |
Hey guys! i was wondering how some games and software have image files that are accessed from .dat and/or .bin files! can i do this for a C++ program? i tried googling but had no hope so i posted here.. i would also like to know how i can make … | |
So I've created an event driven architecture for my current program. I want each new event to have a number generated automatically with a function so I don't have to worry about overlap of id's and referencing is easy. [CODE] class Event { protected: static int get_event_id(); public: virtual int … | |
I want to learn basic web query vc++.I googled around and found that libcurl was the library needed.I have downloaded the necessary files from curl.haxx.se .I do not know how to use these files and make the actual header file and then actually include it in my project. Any help … | |
Hello, I just downloaded the [url=https://mattmccutchen.net/bigint/]big integer library[/url], and I want to use it in my prime number checking program. I downloaded the zip file and got a bunch of .cc and .hh files. I need to know what to do with the files, where I should put them, and … | |
Hi everyone, I was wondering if anyone could provide a bit of help, I need to store an integer value that is 20 bytes in length - I know theres an int32_t and int16_t, but I can't seem to get an integer stored that is only 20 bytes!! I've also … | |
I am trying to make a program that will list all the National Heroes of our Country. We used the switch statement. [CODE]#include "stdafx.h" #include "iostream" #include "stdio.h" #include "conio.h" using namespace std; int main() { int choice,desc; char repeat; cout<<"\t\t\t\tPhilippine National Heroes\n\n"; cout<<"[1]Dr.Jose Rizal\n"; cout<<"[2]Andres Bonifacio\n"; cout<<"[3]General Gregorio Del … | |
I can not run this program in my C++ compiler(Dev c++). [CODE]#include <iostream.h> #include <conio.h> #include <graphics.h> #include <ctype.h> #include <stdlib.h> #include <stdio.h> int main() { // clrscr(); int gd = DETECT,gm,errorcode; //Requesting auto-detection. //Initializing graphics and local variables. initgraph (&gd, &gm, "d:\\bc3\\bgi"); //Path where graphics drivers are installed //Read … | |
I have a class (DataBuffer) that has functions that return objects of DataBuffer but when I'm calling other class functions from within the function that returns the object of DataBuffer, the internal values are not being set after the function returns. So, basically (if you made it through that first … | |
Hey guys! i have yet another problem and cant find a way around it :O i have this function in the class Platform [CODE] void Platform::set_clips(SDL_Rect platClip[], int i) { for( int j = 0; j < i; j++ ) { platClip[j].x = 0; platClip[j].y = 0; platClip[j].w = random_number_w(); … | |
hi im trying to make a "settings" that they are on c++ and saving on text documents here is the code [CODE]#include <iostream> #include <fstream> #include <string> #include <sstream> using namespace std; int main(){ fstream first("firstt.txt");; fstream File("file.txt"); string firsttime; string blah1 = "enable"; string blah2 = "disable"; getline(first, firsttime); … | |
[CODE]#include<iostream> #include<cstdlib> #include<conio.h> using namespace std; int main() { int i,j=0; cout<<"1"; for(i=1;i<=55;i++){ if(j>12) break; else{ if(i%2==0||i%3==0||i%5==0) j++; } } getch(); return 0; } [/CODE] This is my code .I want to print the numbers whose only prime factors are 2, 3 or 5. The sequence 1, 2, 3, 4, … | |
Hey Guys, I was just making a program with music running in the background and whenever I tried to run the .exe file of the program, the music wouldn't play. Extra Info: I'm running Windows 7 and Visual Studio 2010 Express. Here's my code if you need it...(beware: it is … | |
hii,i have to know about performance measurement and improvement library.itz our project topic for btech.plz give an idea about the topic. content:how to improve a c++ program by calculating fn call,fn time,memory allocation and save pointers | |
Hi, Since small object allocation in heap is bad, I am just wondering the range of the object size that is defined to be small. Regards, Michael | |
[code] #pragma comment(lib, "crypt32.lib") #include <stdio.h> #include <windows.h> #include <Wincrypt.h> #include <iostream> #define MY_ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING) //this is keylength bit shifted, here we have keylength of 1024bits hence 1024 << 16; #define KEYLENGTH 0x04000000 using namespace std; int main() { DWORD dwFlags = 0; HCRYPTPROV m_hProv; PBYTE pbKeyBlob; DWORD … | |
hey guys! i am trying to make an algorithm that generates random numbers within a given range ( this range may differ ) i have tried using rand() but i dont like it because the best seed is the time and it doesnt generate numbers random enough. thing is i … | |
| I want to make a c++ program that can open an image that is in any of the major formats (jpg, gif, bmp, png) and has any size and I want to resize it to a specific size (no, I don't care if it looks stretched) and save it to … |
i'm stuck on a program that i am working on in class. your suppose to open a text file with names of shapes and certain lengths of it's sides. it then calculates what it's area/perimeter/volume/circumference and so on and so forth for each shape named in the text file. i … | |
hi everyone, I need to write a piece of code that sort an array of double values named distance[i] in the following code. The counter i is the index for another array as well therefore I don't want to change the order of the array. I got hint from this … |
The End.