49,761 Topics

Member Avatar for
Member Avatar for Kanoisa

Hiya Im trying to make a few efficient maths classes that will optomise using SIMD SSE or SSE2 if the target CPU supports those SIMD variants or failing to support either use a normal CPU bound c++ version. The issue im having is that i want to have for example …

Member Avatar for StuXYZ
0
95
Member Avatar for YasaminKh

Hi everyone, I'm working with a text file. I want to read a part of it into a string. Here is a sample: <MEAN method="jackknife">3.97e-06</MEAN> In the above line i want to put the number 3.97e-06 into a string. The code that i wrote can find the position of the …

Member Avatar for Kanoisa
0
113
Member Avatar for dansnyderECE

I'm trying to convert part of a string. Say I have a bunch of strings and I want to search through all of them, and whenever one of them have the string "34" contained within, I want to convert that part of the string to "XX". Imagine the following: [CODE] …

Member Avatar for dansnyderECE
0
148
Member Avatar for nu2cpp

Hi Guys, I need to convert a 1D array into a 2D array. Usually a easy problem but my problem is the way data is stored in the 1D array The structure of the 1D array is r0c0, r0c1, r1c0, r1c1, etc etc so for example if my 1D array …

Member Avatar for Radical Edward
0
9K
Member Avatar for YasaminKh

Hi there, I'm working with a file. I want to write a code that returns a particular string located somewhere in the file. I have the starting position of the desired string and it's length so I thought that i can use substr(starting position, length of the string) but it …

Member Avatar for YasaminKh
0
123
Member Avatar for uhmyeah

hello, i would say im new to c++, my most advanced program was just a simple tic tac toe application. I am interested in learning more about c++. I have searched A LOT and cant find any good ebooks or links. I need links or ebooks to go further! please …

Member Avatar for NathanOliver
0
168
Member Avatar for hisugan
Member Avatar for mattloto
0
265
Member Avatar for leone86

hello there, im new to C++ and i tried to design this code but the code is not running and i there is the code below [CODE=cpp]#include <iostream> using std::cout; using std::cin; using std::endl; #include <string> using std::string; using std::getline; class staffMember{ public : void setFirstName (string fname){ FirstName = …

Member Avatar for Radical Edward
0
111
Member Avatar for dansnyderECE

So, I've learned my lesson in the past. I'm not experianced enough to design a program from start to finish in an elegant way. I'm not looking for code in any way, just some code flow suggestions if anyone has any. This is what I'm trying to do: -Do a …

Member Avatar for Radical Edward
0
97
Member Avatar for M.manning

Hi all, I was recently working on a C++ application in Xcode (free Mac developer tool) and started running into some really weird BUS errors. What happened was that the code would compile and run fine in terminal up until I initialized two new variables just like this --> …

Member Avatar for Radical Edward
0
65
Member Avatar for sashaa

i have been given an oop project on quiz condution while using operator overloading and file handling ..plzz help:(

Member Avatar for daviddoria
0
39
Member Avatar for charlie4oct

Hey Hi..to everybody..I am new to this C++. My problem is that I want the input and output to be taken from windows interface not from the command line. A window should open and it should ask the question to proceed and the output should appear there.Take for example: it …

Member Avatar for Ancient Dragon
0
91
Member Avatar for sinogoya

how can i make a movable window in turbo C++ by using graphics.h......i mean....as i can move any picture with XOR_PUT .....can i move any editable window???

0
46
Member Avatar for dansnyderECE

I'm trying to compile an assembly file (.asm or .s) from a c++ file to be used in SPIM. SPIM requires that the file be in MIPS32ABI and for MIPS I ISA. My g++ compiler is not working well and I was wondering if there were any compilers out there …

0
90
Member Avatar for Ayaat Monem

Hi all : ) I'm coding a snake game, now the problem is to get the input from the user if I used getch(); the snake will wait until she got an input from the user, so how can I let the snake run normally and expect input in any …

Member Avatar for sinogoya
0
99
Member Avatar for Chosen13

Help please, I wrote a script in C++ for loading a map file, parsing it with XML, and outputting the objects in the file. The XML parser works great, but it won't open the file. I have it exiting if the file doesn't exist, and the file doesn't load, even …

Member Avatar for thelamb
0
246
Member Avatar for edk.theg8

Hi, I want to be able to copy my existing code, with all highlighting & formatting preserved to a file. Is it possible? Evan D. Knight

Member Avatar for Radical Edward
0
41
Member Avatar for dansnyderECE

I'm attempting to manually load the hexdump of an elf file that I compiled using g++ into a processor simulation I designed. There are 30 sections to a standard elf file and I am loading all 30 segments with their proper memory location offset taken into account. I then start …

Member Avatar for dansnyderECE
0
136
Member Avatar for kiwimoosical

Ok, so I am having some trouble with my calculator code. The two issues I am having are: 1. I cant get my program to produce decimals, I have tried using "float" but that didn't work so i don't know how to fix that. 2. I don't know how to …

Member Avatar for Taywin
0
99
Member Avatar for maney
Member Avatar for daviddoria
-4
59
Member Avatar for broli100

I want to make program in WINApi -it is simple window with one textbox - if you will press key 'A',it jumps to textbox(like when you click on it,and then you will be able to write to it). Only thing I dont know is if in WINApi is a function …

Member Avatar for amart
0
391
Member Avatar for iamcreasy

if i open a file ouput using [B]ofstream[/B] it's openmode is set to [B]ios::out[/B] and [B]ios::trunc[/B]... what I have to do, if I want to have only the ios::out flag...not the ios::trunc flag.Because, it is deleting all the previous contents. How do i undo this flag?or, what to do, if …

Member Avatar for iamcreasy
0
179
Member Avatar for mnmw

Check out my code on Pascal's triangle using C++. [CODE]#include "stdafx.h" #include <iostream> using namespace std; int pascals(int,int); int fact(int); int main() { int r,e,levels,space; cout<<"Enter the number of lines needed";cin>>levels; space = levels+1; for(r=0;r<=levels;r++) { // std::cout.width(space);//shape for(e=0;e<r+1;e++) { cout<<pascals(r,e)<<" "; } cout<<endl; space--;//shape } cout<<endl; cin>>r; return 0; …

Member Avatar for dohpaz42
-2
189
Member Avatar for SCoder1

Hi I don't really know where to put this but how does one use WxWidgets with c++. I just need to know the syntax or structure of it. For example: What would wxwidgets equivalent be for the native code... [CODE] #include <iostream> int main() { int num1, num2, total; std::cout<<"Enter …

Member Avatar for daviddoria
0
84
Member Avatar for maney
Member Avatar for nbaztec
0
105
Member Avatar for Crak

hi... i am completely new to xml.. how to compare parsed data in c++??.. I am using expat. should i use huge else-if statements to compare the elements i just extracted ?? is there anyother way of doing it??? I have a feeling i have messed up somewhere..

0
96
Member Avatar for iamcreasy

I am trying to change some data indside a txt file, based on the input given by the user.The input file is [B]indata.txt[/B](The commented part is, what it holds).And the output file is [B]"outdata.txt"[/B]... The problem is with line 52 and 53.Notice that in the loop from line 55 to …

Member Avatar for vijayan121
0
756
Member Avatar for KAY111

Hi guys, I have a code in C++ that was written way back in 1995.Back then,I guess even in C++,#include<iostream.h> was used unlike nowadays, #include<iostream> using namespace std;.....im rite now trying to compile that code with a g++ compiler.It gives the error at lots of places:"cout not declared in this …

Member Avatar for KAY111
0
15K
Member Avatar for LevyDee

So to accept multiple clients, I am dynamically accepting them, but so that I can handle them(data transfer etc...) I wrote a linked list which so far works fine. I can broadcast a message to all clients fine by looping through my list and SEND->client, fairly standard. But when a …

0
43
Member Avatar for Nicco

Hey there! I'm new to c++ and programming in general and have a quick question to why the program below works. I had most of it completed but for hours i couldn't figure out why every time i tried to enter input for the "make" member of my dynamic structure …

Member Avatar for Nicco
0
105

The End.