49,757 Topics

Member Avatar for
Member Avatar for ana_1234

Hey, I have a file that I am working with that I have pass into my program through command line arguments. I don't want to touch the file, just want to store a temp of the file then after fixing the temp place it back in the original. After running …

Member Avatar for WaltP
0
350
Member Avatar for apanimesh061

[CODE] #include <conio.h> #include <iostream> #include <cstring> #include <ctype.h> using namespace System; using namespace System::String; enum CardType{ MasterCard, BankCard, Visa, AmericanExpress, Discover, DinersClub, JCB }; bool Validate(CardType cardType, String cardNumber){ int number[16], len=0; for(int i=0; i<strlen(cardNumber); ++i){ cardNumber[i] = atoi(cardNumber[i]); if(isdigit(cardNumber[i])){ if(len == 16) return false; number[len++] = cardNumber[i]; } …

Member Avatar for teo236
0
1K
Member Avatar for bandrei2408

Hello ! I need your help to calculate the complexity of a program. I need this for my exam and i can't understand how it is calculated. I've tried searching for solutions on google and reading about it but i still can't get it. Maybe if someone can calculate it …

Member Avatar for bandrei2408
0
142
Member Avatar for vergil1983

Hi, i new here.... I'm making a program which can calculate the below expansion of Ln)(1 + x) = x/1 - x^2/2 + x^3/3 - x^4/4 + x^5/5 - x^6/6 Below is my syntax [CODE] #include <iostream.h> int main() { float num1; cout<<"Enter a number: "; cin>>num1; num1 = num1/1 …

Member Avatar for deliezer
0
3K
Member Avatar for K0ns3rv

A little program I made to try and remeber C++, first program I've written in C++ in about a year. Tested and working under windows 7 64 bit, run via command line. If you have any improvements or ideas please leave a comment. Cheers K0ns3rv

Member Avatar for mrnutty
1
318
Member Avatar for deliezer

Hello, I have a difficult memory error to find. I have narrowed it down to a small piece of code, tiny in fact, but the symptoms are baffling to me. I tried to find it with electric fence, but electric fence found nothing. The problem is complicated by my liberal …

Member Avatar for deliezer
0
89
Member Avatar for learningcpp

Hi All, I am facing issue again and would be great if you help me to understand this code: [CODE] #include <iostream> #include <ostream> using namespace std; class A{ int a; public: A(int a):a(a){ } A operator+(A &other){ A aaa(a+other.a); return aaa; } friend ostream& operator<<(ostream &stream, A &aa){ stream …

Member Avatar for learningcpp
0
160
Member Avatar for hutzy

Can someone help me i try c++ text with color and it is blinking now i want the text is moving whatever right to left, left to right. I have no idea plsss i begging someone plss help me exmple plss or teach me!!

Member Avatar for Narue
0
456
Member Avatar for Celtrix

I am having trouble running the lua interpreter at the same time im running sdl and am also having trouble with processing events in sdl while lua is embedded basically in some pseudo code this is what it looks like so far [CODE] #include <lua.hpp> #include <SDL/SDL.h> #include "user.hpp" int …

Member Avatar for Celtrix
0
347
Member Avatar for roidw

Hi, I'm a beginner, and I'm looking for the simplest way to get the source of a webpage into a string under Win. Also, I'm using Dev-Cpp, and I noticed that many of you don't like it, what would you recommend instead?

Member Avatar for VernonDozier
0
85
Member Avatar for WaltP

For years when people post that they are using Turbo-C/C++ they always get a heated response saying basically "[I]why are you using that piece of sh*t? Use Dev-C++ instead.[/I]" Dev-C++ was being recommended because it's newer, it followed the standard better, it's free, etc. A couple years ago, though, it …

Member Avatar for pseudorandom21
0
1K
Member Avatar for treger69

Hi my name is Chris and I am currently enrolled in CMIS102 class. I am really banging my head :@(on multiple occasions) with my latest assignment. I have read every forum, book, and troubleshooting guide there is but nothing out there that has helped me to find the result or …

Member Avatar for prvnkmr194
0
414
Member Avatar for learnersunakshi

[CODE]// Program Dictionary // Proogram that uses linked list to maintain a dictionary #include <iostream.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <string.h> #include <ctype.h> class dict { private : struct node { char data[20] ; char m[100] ; int mcount ; struct node * link ; } *dic[22] ; …

Member Avatar for Agni
0
1K
Member Avatar for sadsdw

Hi friends, I wrote a code to build a matrix with specific calculations. When I'm using 3000 elements works well ... But I did a test with 150.000 (150.000 x 150.000) and I had problems. " terminate called after throwing an instance of 'std::bad_alloc' " I'm copying the code part …

Member Avatar for sadsdw
0
2K
Member Avatar for v_janssens

I have a class Node and want to declare an initially unknown number of instances of this class at run-time. First the program determines the number of nodes (num_n) from the user and then I want to define num_n objects. I have crudely got around this by defining a maximum …

Member Avatar for alwaysLearning0
0
212
Member Avatar for lenzo

excuse me if this question has been asked before than i am sorry i couldn't find it. so i am ruining Ubuntu on my desktop computer and i have started c++ using code blocks i was wondering how do you make a GUI window for Linux or am i using …

Member Avatar for Celtrix
0
290
Member Avatar for CPT

I know that you can use assembly combined with C++(either inline or using modules written completely in assembly, linked with the rest of the program), and I was curious how does a program written in different programming languages(eg Mozilla Firefox)work, and how it gets built.

Member Avatar for Celtrix
0
108
Member Avatar for sachinchandora

i have a error in c graphics "segment exceeds _TEXT 64K" i reduce some lines but i have no solution please help me as soon as possible i want to complete my program as soon as possible please help me some one

Member Avatar for Salem
0
1K
Member Avatar for ali jiger

Win32 based application (Using DirectShow and VC++), that uses the UVC driver (part of WDK) in the background for the tasks we require to implement.

0
65
Member Avatar for thecoolman5

hi, i am using DEV-C++ and i have two problems with this code: [CODE]#include<iostream> #include<string> #include<sstream> using namespace std; int main (char argc) { string n1; getline(cin,n1); int len; len = n1.length(); int len1 = -2; int len2 = -1; for(int t = len; t>0; t--) { len1 = len1 …

Member Avatar for thecoolman5
0
578
Member Avatar for Labdabeta

I have been away from internet connection for awhile. Anyways, I am still having library issues using VBOs. Now the only warning that I am getting is [ICODE]undefined reference to 'XXX@Y'[/ICODE] Where XXX is either CreateFont, SelectObject, ChoosePixelFormat, SetPixelFormat, GetObject, DeleteObject, or SwapBuffers and Y is a line number. What …

Member Avatar for Labdabeta
0
140
Member Avatar for tomtetlaw

I'm trying to understand how to change a windowed-window to a fullscreen-window at run time. What I do is use a DEVMODE structure with ChangeDisplaySettings when I want to make it fullscreen. I set the width and height to the width and height of the screen, which is fine. But …

Member Avatar for tomtetlaw
0
1K
Member Avatar for hadiza

please how can i write a complete c++ program that prints full name and registration number in two lines

Member Avatar for Narue
-3
113
Member Avatar for macla
Member Avatar for kuntakkhong

how to write a programme that read an integer between 0 and 9999 and add all the digits in the integer. for example, if an integer is 8235, the sum of entire digit is 18.

Member Avatar for Moschops
-1
45
Member Avatar for clisen

I'm having issues with a rather simple program that prints a string. I have two .cpp files, main and login, with login.h header file. The problem at hand is that when I want to print the string in main.cpp that was entered from login.cpp - nothing is shown in which …

Member Avatar for clisen
0
279
Member Avatar for TheLittleEngine

So i haven't figured out what the point of constructors are i am just learning C++ and am seriously having trouble with it, i do not get why...well i kind of get default constructors because it initializes the variables but what about a constructor with arguments and the member function

Member Avatar for Stefano Mtangoo
0
208
Member Avatar for SilentCoder

Hey guys i am new to c++ and i was practicing read/write specific line from an ini file. My File [CODE] // browser ini file // options resolution 100 300 fullscreen 1 account "silentcoder" [/CODE] My Code [Prints out the whole configuration file since my code said to do so] …

Member Avatar for m4ster_r0shi
0
11K
Member Avatar for Mahsa_C++

Hi all! I am a newbie to openCV programming and my task is to make a comparison between the CPU functions and the corresponding GPU functions available in the openCV library.I'm going to port a number of algorithms to GPU, using openCV gpu module. I have been having troubles finding …

Member Avatar for Stefano Mtangoo
0
147
Member Avatar for theguitarist

I have to accept three numbers from the user using cin into 3 variables. If the user enters non integers,I must reject it and ask for a new one instead of that. So,here is my attempt: [CODE]int a,b,c; do{ cin.clear(); while(cin.get()!='\n');//remove failure bits,clear stream if wrong input cin>>a; } while(!cin);//while …

Member Avatar for m4ster_r0shi
0
186

The End.